feat(ui): RefreshIndicator + AlwaysScrollable + dark mode sur 14 pages

RefreshIndicator ajouté (dispatche les events BLoC appropriés) :
- adhesion_detail, adhesions_page, demande_aide_detail, demandes_aide_page
- event_detail, organization_detail, org_selector, org_types
- user_management_detail, reports (TabBarView), logs (Dashboard tab)
- profile (onglet Perso), backup (3 onglets), notifications

Fixes associés :
- AlwaysScrollableScrollPhysics sur tous les scroll widgets
  (permet pull-to-refresh même si contenu < écran)
- Empty states des listes : wrappés dans SingleChildScrollView pour refresh
- Dark mode adaptatif sur textes/surfaces/borders hardcodés
- backup_page : bouton retour ajouté dans le header gradient
- org_types : chevron/star/border adaptatifs
- reports : couleurs placeholders graphique + chevrons
This commit is contained in:
dahoud
2026-04-15 20:13:50 +00:00
parent f78892e5f6
commit 55f84da49a
14 changed files with 1565 additions and 1538 deletions

View File

@@ -28,18 +28,19 @@ class _DemandeAideDetailPageState extends State<DemandeAideDetailPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.background,
appBar: const UFAppBar(
title: 'DÉTAIL DEMANDE',
backgroundColor: AppColors.surface,
foregroundColor: AppColors.textPrimaryLight,
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: UFAppBar(
title: 'Détail Demande',
moduleGradient: ModuleColors.solidariteGradient,
),
body: BlocConsumer<SolidarityBloc, SolidarityState>(
body: SafeArea(
top: false,
child: BlocConsumer<SolidarityBloc, SolidarityState>(
listenWhen: (prev, curr) => prev.status != curr.status,
listener: (context, state) {
if (state.status == SolidarityStatus.error && state.message != null) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text(state.message!), backgroundColor: Colors.red),
SnackBar(content: Text(state.message!), backgroundColor: AppColors.error),
);
}
},
@@ -55,7 +56,7 @@ class _DemandeAideDetailPageState extends State<DemandeAideDetailPage> {
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(Icons.error_outline, size: 64, color: Colors.grey),
const Icon(Icons.error_outline, size: 64, color: AppColors.textTertiary),
const SizedBox(height: 16),
Text(
'Demande introuvable',
@@ -65,7 +66,12 @@ class _DemandeAideDetailPageState extends State<DemandeAideDetailPage> {
),
);
}
return SingleChildScrollView(
return RefreshIndicator(
color: ModuleColors.solidarite,
onRefresh: () async =>
context.read<SolidarityBloc>().add(LoadDemandeAideById(widget.demandeId)),
child: SingleChildScrollView(
physics: const AlwaysScrollableScrollPhysics(),
padding: const EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -97,10 +103,12 @@ class _DemandeAideDetailPageState extends State<DemandeAideDetailPage> {
_ActionsSection(demande: d, isGestionnaire: _isGestionnaire()),
],
),
);
), // SingleChildScrollView
); // RefreshIndicator
},
),
);
), // BlocConsumer
), // SafeArea
); // Scaffold
}
bool _isGestionnaire() {
@@ -136,7 +144,7 @@ class _InfoCard extends StatelessWidget {
style: AppTypography.subtitleSmall.copyWith(
fontWeight: FontWeight.bold,
fontSize: 9,
color: AppColors.textSecondaryLight,
color: AppColors.textSecondary,
),
),
const SizedBox(height: 2),