6b5d12f3a1
ListView of three AdminSectionCard tiles (Requests / Quarantine / Users) showing live counts from adminCountsProvider. Pull-to-refresh re-fans-out to the three list endpoints. Admin/Quarantine/Users sub-routes will land in subsequent commits. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
54 lines
1.4 KiB
Dart
54 lines
1.4 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../theme/theme_extension.dart';
|
|
|
|
class AdminSectionCard extends StatelessWidget {
|
|
const AdminSectionCard({
|
|
super.key,
|
|
required this.icon,
|
|
required this.title,
|
|
required this.subtitle,
|
|
required this.count,
|
|
required this.onTap,
|
|
});
|
|
|
|
final IconData icon;
|
|
final String title;
|
|
final String subtitle;
|
|
final int count;
|
|
final VoidCallback onTap;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final fs = Theme.of(context).extension<FabledSwordTheme>()!;
|
|
return Card(
|
|
color: fs.iron,
|
|
margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
|
child: ListTile(
|
|
leading: Icon(icon, color: fs.parchment),
|
|
title: Text(
|
|
title,
|
|
style: TextStyle(
|
|
color: fs.parchment,
|
|
fontFamily: 'Fraunces',
|
|
fontSize: 18,
|
|
),
|
|
),
|
|
subtitle: Text(subtitle, style: TextStyle(color: fs.ash)),
|
|
trailing: Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
|
|
decoration: BoxDecoration(
|
|
color: fs.bronze,
|
|
borderRadius: BorderRadius.circular(12),
|
|
),
|
|
child: Text(
|
|
'$count',
|
|
style: TextStyle(color: fs.obsidian, fontWeight: FontWeight.w500),
|
|
),
|
|
),
|
|
onTap: onTap,
|
|
),
|
|
);
|
|
}
|
|
}
|