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:
@@ -76,17 +76,16 @@ class _DemandesAidePageState extends State<DemandesAidePage>
|
||||
}
|
||||
},
|
||||
child: Scaffold(
|
||||
backgroundColor: AppColors.background,
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
appBar: UFAppBar(
|
||||
title: 'SOLIDARITÉ',
|
||||
backgroundColor: AppColors.surface,
|
||||
foregroundColor: AppColors.textPrimaryLight,
|
||||
title: 'Solidarité',
|
||||
moduleGradient: ModuleColors.solidariteGradient,
|
||||
bottom: TabBar(
|
||||
controller: _tabController,
|
||||
onTap: _loadTab,
|
||||
labelColor: AppColors.primaryGreen,
|
||||
unselectedLabelColor: AppColors.textSecondaryLight,
|
||||
indicatorColor: AppColors.primaryGreen,
|
||||
labelColor: Colors.white,
|
||||
unselectedLabelColor: Colors.white70,
|
||||
indicatorColor: Colors.white,
|
||||
indicatorSize: TabBarIndicatorSize.label,
|
||||
labelStyle: AppTypography.actionText.copyWith(fontSize: 10, fontWeight: FontWeight.bold),
|
||||
tabs: const [
|
||||
@@ -125,7 +124,13 @@ class _DemandesAidePageState extends State<DemandesAidePage>
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Icon(Icons.volunteer_activism_outlined, size: 32, color: AppColors.lightBorder),
|
||||
Icon(
|
||||
Icons.volunteer_activism_outlined,
|
||||
size: 32,
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? AppColors.borderDark
|
||||
: AppColors.border,
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
Text('Aucune demande', style: AppTypography.subtitleSmall),
|
||||
],
|
||||
@@ -204,7 +209,7 @@ class _DemandeCard extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
_buildStatutBadge(demande.statut),
|
||||
_buildStatutBadge(context, demande.statut),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: 12),
|
||||
@@ -217,7 +222,7 @@ class _DemandeCard extends StatelessWidget {
|
||||
Text('MONTANT DEMANDÉ', style: AppTypography.subtitleSmall.copyWith(fontSize: 8, fontWeight: FontWeight.bold)),
|
||||
Text(
|
||||
currencyFormat.format(demande.montantDemande ?? 0),
|
||||
style: AppTypography.headerSmall.copyWith(fontSize: 13, color: AppColors.primaryGreen),
|
||||
style: AppTypography.headerSmall.copyWith(fontSize: 13, color: AppColors.primary),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -235,7 +240,7 @@ class _DemandeCard extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildStatutBadge(String? statut) {
|
||||
Widget _buildStatutBadge(BuildContext context, String? statut) {
|
||||
Color color;
|
||||
switch (statut) {
|
||||
case 'APPROUVEE':
|
||||
@@ -246,10 +251,12 @@ class _DemandeCard extends StatelessWidget {
|
||||
break;
|
||||
case 'EN_ATTENTE':
|
||||
case 'SOUMISE':
|
||||
color = AppColors.brandGreenLight;
|
||||
color = AppColors.primaryLight;
|
||||
break;
|
||||
default:
|
||||
color = AppColors.textSecondaryLight;
|
||||
color = Theme.of(context).brightness == Brightness.dark
|
||||
? AppColors.textSecondaryDark
|
||||
: AppColors.textSecondary;
|
||||
}
|
||||
return InfoBadge(text: statut ?? 'INCONNU', backgroundColor: color);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user