Files
smart-serow/pi/ui/lib/widgets/stat_box.dart

40 lines
915 B
Dart
Raw Normal View History

2026-01-25 18:47:35 +09:00
import 'package:flutter/material.dart';
import '../theme/app_theme.dart';
2026-01-25 18:47:35 +09:00
/// A labeled stat display box for the dashboard
class StatBox extends StatelessWidget {
final String label;
final String value;
const StatBox({super.key, required this.label, required this.value});
@override
Widget build(BuildContext context) {
final theme = AppTheme.of(context);
2026-01-26 11:35:17 +09:00
return Expanded(
flex: 1,
child: Column(
children: [
Text(
value,
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
fontSize: 100,
color: theme.foreground,
),
2026-01-25 18:47:35 +09:00
),
2026-01-26 11:35:17 +09:00
Text(
label,
style: Theme.of(context).textTheme.bodySmall?.copyWith(
fontSize: 80,
color: theme.subdued,
letterSpacing: 1,
),
2026-01-25 18:47:35 +09:00
),
2026-01-26 11:35:17 +09:00
],
)
2026-01-25 18:47:35 +09:00
);
}
}