feat(ui): dark mode adaptatif sur 15 pages/widgets restants
Pattern AppColors pair (isDark ternaries) appliqué sur : - login_page : SnackBar error color Color(0xFFDC2626) → AppColors.error (gradient brand intentionnel non modifié) - help_support : barre de recherche + ExpansionTile + chevrons → scheme adaptatif - system_settings : état 'Accès réservé' + unselectedLabelColor TabBar - epargne : date/description/boutons OutlinedButton foregroundColor adaptatifs - conversation_tile, connected_recent_activities, connected_upcoming_events - dashboard_notifications_widget - budgets_list_page, pending_approvals_page, approve/reject_dialog - create_organization_page, edit_organization_page, about_page Les couleurs sémantiques (error, success, warning, primary) restent inchangées. Les blancs/gradients intentionnels (AppBars brand, logos payment) préservés.
This commit is contained in:
@@ -173,28 +173,28 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
'VUE D\'ENSEMBLE',
|
||||
style: AppTypography.subtitleSmall.copyWith(fontWeight: FontWeight.bold),
|
||||
),
|
||||
const Icon(Icons.account_balance_wallet, color: AppColors.primaryGreen, size: 24),
|
||||
const Icon(Icons.account_balance_wallet, color: AppColors.primary, size: 24),
|
||||
],
|
||||
),
|
||||
const SizedBox(height: SpacingTokens.md),
|
||||
Text(
|
||||
'${total.toStringAsFixed(0)} XOF',
|
||||
style: AppTypography.headerSmall.copyWith(fontSize: 24, color: AppColors.primaryGreen),
|
||||
style: AppTypography.headerSmall.copyWith(fontSize: 24, color: AppColors.primary),
|
||||
),
|
||||
const SizedBox(height: SpacingTokens.xs),
|
||||
Text(
|
||||
'Solde disponible total • ${_comptes.length} compte${_comptes.length > 1 ? 's' : ''}',
|
||||
style: AppTypography.bodyTextSmall.copyWith(color: AppColors.textSecondaryLight),
|
||||
style: AppTypography.bodyTextSmall.copyWith(color: Theme.of(context).colorScheme.onSurfaceVariant),
|
||||
),
|
||||
if (_comptes.any((c) => c.soldeBloque > 0)) ...[
|
||||
const SizedBox(height: SpacingTokens.xs),
|
||||
Row(
|
||||
children: [
|
||||
Icon(Icons.shield_outlined, size: 12, color: Colors.amber.shade700),
|
||||
Icon(Icons.shield_outlined, size: 12, color: AppColors.warning),
|
||||
const SizedBox(width: 4),
|
||||
Text(
|
||||
'Certains fonds sont sous surveillance LCB-FT',
|
||||
style: AppTypography.bodyTextSmall.copyWith(fontSize: 10, color: Colors.amber.shade700),
|
||||
style: AppTypography.bodyTextSmall.copyWith(fontSize: 10, color: AppColors.warning),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -234,12 +234,17 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
if (typeLibelle != null)
|
||||
Text(
|
||||
typeLibelle,
|
||||
style: AppTypography.subtitleSmall.copyWith(color: AppColors.textSecondaryLight),
|
||||
style: AppTypography.subtitleSmall.copyWith(color: Theme.of(context).colorScheme.onSurfaceVariant),
|
||||
),
|
||||
if (dateStr != null)
|
||||
Text(
|
||||
dateStr,
|
||||
style: AppTypography.bodyTextSmall.copyWith(fontSize: 10, color: AppColors.textSecondaryLight),
|
||||
style: AppTypography.bodyTextSmall.copyWith(
|
||||
fontSize: 10,
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? AppColors.textSecondaryDark
|
||||
: AppColors.textSecondary,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -252,16 +257,16 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 3),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.amber.withOpacity(0.15),
|
||||
color: AppColors.warningContainer,
|
||||
borderRadius: BorderRadius.circular(6),
|
||||
border: Border.all(color: Colors.amber.shade700, width: 1),
|
||||
border: Border.all(color: AppColors.warning, width: 1),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(Icons.shield_outlined, size: 12, color: Colors.amber.shade700),
|
||||
Icon(Icons.shield_outlined, size: 12, color: AppColors.warning),
|
||||
const SizedBox(width: 3),
|
||||
Text('LCB-FT', style: TextStyle(fontSize: 9, fontWeight: FontWeight.bold, color: Colors.amber.shade700)),
|
||||
Text('LCB-FT', style: TextStyle(fontSize: 9, fontWeight: FontWeight.bold, color: AppColors.warning)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -270,7 +275,7 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
if (c.statut != null)
|
||||
InfoBadge(
|
||||
text: c.statut!,
|
||||
backgroundColor: c.statut == 'ACTIF' ? AppColors.success : AppColors.textSecondaryLight,
|
||||
backgroundColor: c.statut == 'ACTIF' ? AppColors.success : AppColors.textSecondary,
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -284,7 +289,7 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
Text('SOLDE ACTUEL', style: AppTypography.subtitleSmall.copyWith(fontSize: 8, fontWeight: FontWeight.bold)),
|
||||
Text(
|
||||
'${c.soldeActuel.toStringAsFixed(0)} XOF',
|
||||
style: AppTypography.headerSmall.copyWith(fontSize: 14, color: AppColors.primaryGreen),
|
||||
style: AppTypography.headerSmall.copyWith(fontSize: 14, color: AppColors.primary),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -305,7 +310,7 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
const SizedBox(height: SpacingTokens.sm),
|
||||
Text(
|
||||
c.description!,
|
||||
style: AppTypography.bodyTextSmall.copyWith(fontSize: 11, color: AppColors.textSecondaryLight),
|
||||
style: AppTypography.bodyTextSmall.copyWith(fontSize: 11, color: AppColors.textSecondary),
|
||||
maxLines: 2,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
@@ -321,8 +326,8 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
onPressed: () => _openDepot(c),
|
||||
style: FilledButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(vertical: SpacingTokens.sm),
|
||||
backgroundColor: AppColors.primaryGreen.withOpacity(0.1),
|
||||
foregroundColor: AppColors.primaryGreen,
|
||||
backgroundColor: AppColors.primary.withOpacity(0.1),
|
||||
foregroundColor: AppColors.primary,
|
||||
),
|
||||
child: const Text('Dépôt', style: TextStyle(fontSize: 12)),
|
||||
),
|
||||
@@ -333,8 +338,8 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
onPressed: soldeDispo > 0 ? () => _openRetrait(c) : null,
|
||||
style: FilledButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(vertical: SpacingTokens.sm),
|
||||
backgroundColor: AppColors.primaryGreen.withOpacity(0.1),
|
||||
foregroundColor: AppColors.primaryGreen,
|
||||
backgroundColor: AppColors.primary.withOpacity(0.1),
|
||||
foregroundColor: AppColors.primary,
|
||||
),
|
||||
child: const Text('Retrait', style: TextStyle(fontSize: 12)),
|
||||
),
|
||||
@@ -346,8 +351,8 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
onPressed: soldeDispo > 0 ? () => _openTransfert(c) : null,
|
||||
style: FilledButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(vertical: SpacingTokens.sm),
|
||||
backgroundColor: AppColors.primaryGreen.withOpacity(0.1),
|
||||
foregroundColor: AppColors.primaryGreen,
|
||||
backgroundColor: AppColors.primary.withOpacity(0.1),
|
||||
foregroundColor: AppColors.primary,
|
||||
),
|
||||
child: const Text('Transférer', style: TextStyle(fontSize: 12)),
|
||||
),
|
||||
@@ -365,7 +370,9 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
label: const Text('Détail', style: TextStyle(fontSize: 12)),
|
||||
style: OutlinedButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(vertical: SpacingTokens.sm),
|
||||
foregroundColor: AppColors.textPrimaryLight,
|
||||
foregroundColor: Theme.of(context).brightness == Brightness.dark
|
||||
? AppColors.textPrimaryDark
|
||||
: AppColors.textPrimary,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -377,7 +384,9 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
label: const Text('Historique', style: TextStyle(fontSize: 12)),
|
||||
style: OutlinedButton.styleFrom(
|
||||
padding: const EdgeInsets.symmetric(vertical: SpacingTokens.sm),
|
||||
foregroundColor: AppColors.textPrimaryLight,
|
||||
foregroundColor: Theme.of(context).brightness == Brightness.dark
|
||||
? AppColors.textPrimaryDark
|
||||
: AppColors.textPrimary,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -424,17 +433,17 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Icon(Icons.savings_outlined, size: 64, color: AppColors.textSecondaryLight),
|
||||
Icon(Icons.savings_outlined, size: 64, color: Theme.of(context).colorScheme.onSurfaceVariant),
|
||||
const SizedBox(height: SpacingTokens.lg),
|
||||
Text(
|
||||
'Aucun compte épargne',
|
||||
style: AppTypography.actionText.copyWith(color: AppColors.textSecondaryLight),
|
||||
style: AppTypography.actionText.copyWith(color: Theme.of(context).colorScheme.onSurfaceVariant),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const SizedBox(height: SpacingTokens.sm),
|
||||
Text(
|
||||
'Votre organisation peut ouvrir un compte épargne pour vous. Contactez-la pour en bénéficier.',
|
||||
style: AppTypography.bodyTextSmall.copyWith(color: AppColors.textSecondaryLight),
|
||||
style: AppTypography.bodyTextSmall.copyWith(color: Theme.of(context).colorScheme.onSurfaceVariant),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
@@ -459,19 +468,18 @@ class _EpargnePageState extends State<EpargnePage> {
|
||||
Widget build(BuildContext context) {
|
||||
final showFab = _canCreateCompte(context);
|
||||
return Scaffold(
|
||||
backgroundColor: AppColors.background,
|
||||
appBar: const UFAppBar(
|
||||
title: 'COMPTES ÉPARGNE',
|
||||
backgroundColor: AppColors.surface,
|
||||
foregroundColor: AppColors.textPrimaryLight,
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
appBar: UFAppBar(
|
||||
title: 'Comptes Épargne',
|
||||
moduleGradient: ModuleColors.epargneGradient,
|
||||
),
|
||||
body: _buildBodyContent(),
|
||||
floatingActionButton: showFab
|
||||
? FloatingActionButton(
|
||||
onPressed: _openCreerCompte,
|
||||
tooltip: 'Créer un compte épargne pour un membre',
|
||||
backgroundColor: AppColors.primaryGreen,
|
||||
foregroundColor: Colors.white,
|
||||
backgroundColor: AppColors.primary,
|
||||
foregroundColor: AppColors.onPrimary,
|
||||
child: const Icon(Icons.add),
|
||||
)
|
||||
: null,
|
||||
|
||||
Reference in New Issue
Block a user