MIF_E31231313/Android/flutter_app/lib/widgets/summary_count_card.dart

56 lines
1.4 KiB
Dart

import 'package:flutter/material.dart';
import 'package:s_gizi/app_design.dart';
class SummaryCountCard extends StatelessWidget {
const SummaryCountCard({
super.key,
required this.label,
required this.value,
required this.icon,
required this.color,
});
final String label;
final int value;
final IconData icon;
final Color color;
@override
Widget build(BuildContext context) {
return Container(
constraints: const BoxConstraints(minWidth: 108),
padding: const EdgeInsets.all(12),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(18),
border: Border.all(color: const Color(0xFFE5F0EF)),
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.04),
blurRadius: 14,
offset: const Offset(0, 7),
),
],
),
child: Row(
children: [
CircleAvatar(
radius: 16,
backgroundColor: color.withValues(alpha: 0.12),
child: Icon(icon, color: color, size: 16),
),
const SizedBox(width: 9),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('$value', style: AppTypography.h3),
Text(label, style: AppTypography.caption),
],
),
],
),
);
}
}