2026-01-25 18:47:35 +09:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
2026-01-26 00:20:52 +09:00
|
|
|
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) {
|
2026-01-26 00:20:52 +09:00
|
|
|
final theme = AppTheme.of(context);
|
|
|
|
|
|
2026-01-25 18:47:35 +09:00
|
|
|
return Column(
|
|
|
|
|
children: [
|
|
|
|
|
Text(
|
|
|
|
|
value,
|
|
|
|
|
style: Theme.of(context).textTheme.headlineMedium?.copyWith(
|
2026-01-26 00:20:52 +09:00
|
|
|
fontSize: 100,
|
|
|
|
|
color: theme.foreground,
|
2026-01-25 18:47:35 +09:00
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Text(
|
|
|
|
|
label,
|
|
|
|
|
style: Theme.of(context).textTheme.bodySmall?.copyWith(
|
2026-01-26 00:20:52 +09:00
|
|
|
fontSize: 80,
|
|
|
|
|
color: theme.subdued,
|
2026-01-25 18:47:35 +09:00
|
|
|
letterSpacing: 1,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|