fix phone dashboard

This commit is contained in:
root
2026-05-27 03:11:45 -04:00
parent 7ca43ba2f3
commit 1112b04516
48 changed files with 1222 additions and 368 deletions
+44 -6
View File
@@ -6,6 +6,8 @@ class StatCard extends StatelessWidget {
final IconData icon;
final Color color;
final String? subtitle;
final double? change;
final String? footerLabel;
const StatCard({
super.key,
@@ -14,10 +16,14 @@ class StatCard extends StatelessWidget {
required this.icon,
required this.color,
this.subtitle,
this.change,
this.footerLabel,
});
@override
Widget build(BuildContext context) {
final cs = Theme.of(context).colorScheme;
return Card(
child: Padding(
padding: const EdgeInsets.all(16),
@@ -40,30 +46,62 @@ class StatCard extends StatelessWidget {
const SizedBox(height: 12),
Text(
value,
style: const TextStyle(
style: TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Color(0xFF111928),
color: cs.onSurface,
),
),
const SizedBox(height: 4),
Text(
title,
style: const TextStyle(
style: TextStyle(
fontSize: 13,
color: Color(0xFF6B7280),
color: cs.onSurfaceVariant,
),
),
if (subtitle != null) ...[
const SizedBox(height: 4),
Text(
subtitle!,
style: const TextStyle(
style: TextStyle(
fontSize: 11,
color: Color(0xFF9CA3AF),
color: cs.onSurfaceVariant.withValues(alpha: 0.85),
),
),
],
if (change != null) ...[
const SizedBox(height: 6),
Row(
children: [
Text(
'${change! >= 0 ? '+' : ''}${change!.toStringAsFixed(1)}%',
style: TextStyle(
fontSize: 11,
fontWeight: FontWeight.w600,
color: change! > 0
? const Color(0xFF0E9F6E)
: change! < 0
? const Color(0xFFE02424)
: cs.onSurfaceVariant,
),
),
if (footerLabel != null) ...[
const SizedBox(width: 6),
Expanded(
child: Text(
footerLabel!,
style: TextStyle(
fontSize: 11,
color: cs.onSurfaceVariant.withValues(alpha: 0.85),
),
overflow: TextOverflow.ellipsis,
),
),
],
],
),
],
],
),
),