52 lines
1.2 KiB
Dart
52 lines
1.2 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class SummaryItem extends StatelessWidget {
|
|
final IconData icon;
|
|
final String title;
|
|
final String amount;
|
|
final Color color;
|
|
|
|
const SummaryItem({
|
|
Key? key,
|
|
required this.icon,
|
|
required this.title,
|
|
required this.amount,
|
|
required this.color,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final isDark = Theme.of(context).brightness == Brightness.dark;
|
|
return Column(
|
|
children: [
|
|
Row(
|
|
children: [
|
|
Icon(
|
|
icon,
|
|
size: 16,
|
|
color: isDark ? color.withOpacity(0.8) : color,
|
|
),
|
|
const SizedBox(width: 4),
|
|
Text(
|
|
title,
|
|
style: TextStyle(
|
|
fontSize: 13,
|
|
color: isDark ? Colors.grey.shade400 : Colors.grey.shade700,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 4),
|
|
Text(
|
|
amount,
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.bold,
|
|
color: isDark ? Colors.white : Colors.black87,
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|