47 lines
1.1 KiB
Dart
47 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../../../core/constants/app_constants.dart';
|
|
|
|
class StatsCard extends StatelessWidget {
|
|
final IconData icon;
|
|
final String title;
|
|
final String value;
|
|
final Color color;
|
|
|
|
const StatsCard({
|
|
super.key,
|
|
required this.icon,
|
|
required this.title,
|
|
required this.value,
|
|
required this.color,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Card(
|
|
child: Padding(
|
|
padding: const EdgeInsets.all(AppConstants.defaultPadding),
|
|
child: Column(
|
|
children: [
|
|
Icon(icon, color: color, size: 32),
|
|
const SizedBox(height: 8),
|
|
Text(
|
|
value,
|
|
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
|
|
fontWeight: FontWeight.bold,
|
|
color: color,
|
|
),
|
|
),
|
|
const SizedBox(height: 4),
|
|
Text(
|
|
title,
|
|
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
|
color: Colors.grey[600],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|