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:
dahoud
2026-04-15 20:14:59 +00:00
parent b2f29922d3
commit ba779a7a40
15 changed files with 1002 additions and 1146 deletions

View File

@@ -39,40 +39,46 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
appBar: const UFAppBar(title: 'AIDE & SUPPORT'),
body: SingleChildScrollView(
padding: const EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Header harmonisé
_buildHeader(),
const SizedBox(height: 8),
appBar: UFAppBar(
title: 'Aide & Support',
moduleGradient: ModuleColors.supportGradient,
),
body: SafeArea(
top: false,
child: SingleChildScrollView(
padding: const EdgeInsets.all(12),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
// Header harmonisé
_buildHeader(),
const SizedBox(height: 8),
// Barre de recherche
_buildSearchSection(),
const SizedBox(height: 8),
// Barre de recherche
_buildSearchSection(),
const SizedBox(height: 8),
// Actions rapides
_buildQuickActionsSection(),
const SizedBox(height: 8),
// Actions rapides
_buildQuickActionsSection(),
const SizedBox(height: 8),
// Catégories FAQ
_buildCategoriesSection(),
const SizedBox(height: 8),
// Catégories FAQ
_buildCategoriesSection(),
const SizedBox(height: 8),
// FAQ
_buildFAQSection(),
const SizedBox(height: 8),
// FAQ
_buildFAQSection(),
const SizedBox(height: 8),
// Guides et tutoriels
_buildGuidesSection(),
const SizedBox(height: 8),
// Guides et tutoriels
_buildGuidesSection(),
const SizedBox(height: 8),
// Contact support
_buildContactSection(),
const SizedBox(height: 80),
],
// Contact support
_buildContactSection(),
const SizedBox(height: 80),
],
),
),
),
);
@@ -86,12 +92,12 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: AppColors.primaryGreen.withOpacity(0.1),
color: AppColors.primary.withOpacity(0.1),
borderRadius: BorderRadius.circular(12),
),
child: const Icon(
Icons.help_outline,
color: AppColors.primaryGreen,
color: AppColors.primary,
size: 32,
),
),
@@ -113,13 +119,17 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
/// Section de recherche
Widget _buildSearchSection() {
final isDark = Theme.of(context).brightness == Brightness.dark;
final bgSearch = isDark ? AppColors.surfaceVariantDark : AppColors.surface;
final borderSearch = isDark ? AppColors.borderDark : AppColors.border;
final iconColor = isDark ? AppColors.textSecondaryDark : AppColors.textSecondary;
return CoreCard(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
const Icon(Icons.search, color: AppColors.primaryGreen, size: 18),
const Icon(Icons.search, color: AppColors.primary, size: 18),
const SizedBox(width: 8),
Text(
'RECHERCHER DANS L\'AIDE',
@@ -130,9 +140,9 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
const SizedBox(height: 12),
Container(
decoration: BoxDecoration(
color: AppColors.lightSurface,
color: bgSearch,
borderRadius: BorderRadius.circular(8),
border: Border.all(color: AppColors.lightBorder),
border: Border.all(color: borderSearch),
),
child: TextField(
controller: _searchController,
@@ -141,14 +151,14 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
decoration: InputDecoration(
hintText: 'Une question, un mot-clé...',
hintStyle: AppTypography.subtitleSmall,
prefixIcon: const Icon(Icons.search, color: AppColors.textSecondaryLight, size: 18),
prefixIcon: Icon(Icons.search, color: iconColor, size: 18),
suffixIcon: _searchQuery.isNotEmpty
? IconButton(
onPressed: () {
_searchController.clear();
setState(() => _searchQuery = '');
},
icon: const Icon(Icons.clear, color: AppColors.textSecondaryLight, size: 18),
icon: Icon(Icons.clear, color: iconColor, size: 18),
)
: null,
border: InputBorder.none,
@@ -180,7 +190,7 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
'CHAT',
'Support Direct',
Icons.chat_bubble_outline,
AppColors.primaryGreen,
AppColors.primary,
() => _startLiveChat(),
),
),
@@ -286,16 +296,16 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
child: Container(
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 4),
decoration: BoxDecoration(
color: isSelected ? AppColors.primaryGreen.withOpacity(0.1) : Colors.transparent,
color: isSelected ? AppColors.primary.withOpacity(0.1) : Colors.transparent,
borderRadius: BorderRadius.circular(4),
border: Border.all(
color: isSelected ? AppColors.primaryGreen : AppColors.lightBorder,
color: isSelected ? AppColors.primary : AppColors.border,
),
),
child: Text(
label.toUpperCase(),
style: AppTypography.badgeText.copyWith(
color: isSelected ? AppColors.primaryGreen : AppColors.textSecondaryLight,
color: isSelected ? AppColors.primary : AppColors.textSecondary,
fontSize: 9,
fontWeight: isSelected ? FontWeight.bold : FontWeight.normal,
),
@@ -338,11 +348,13 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
),
leading: Icon(
faq['icon'] as IconData,
color: AppColors.primaryGreen,
color: AppColors.primary,
size: 18,
),
iconColor: AppColors.primaryGreen,
collapsedIconColor: AppColors.textSecondaryLight,
iconColor: AppColors.primary,
collapsedIconColor: Theme.of(context).brightness == Brightness.dark
? AppColors.textSecondaryDark
: AppColors.textSecondary,
shape: const RoundedRectangleBorder(side: BorderSide.none),
children: [
Padding(
@@ -370,7 +382,7 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
),
),
_buildGuideItem('Introduction', 'Démarrer avec UnionFlow', Icons.play_circle_outline, AppColors.success, () => _openGuide('getting-started')),
_buildGuideItem('Membres', 'Gérer vos adhérents', Icons.people_outline, AppColors.primaryGreen, () => _openGuide('members')),
_buildGuideItem('Membres', 'Gérer vos adhérents', Icons.people_outline, AppColors.primary, () => _openGuide('members')),
_buildGuideItem('Organisations', 'Structures & Syndicats', Icons.business_outlined, AppColors.info, () => _openGuide('organizations')),
],
);
@@ -394,7 +406,13 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
],
),
),
const Icon(Icons.chevron_right, color: AppColors.textSecondaryLight, size: 16),
Icon(
Icons.chevron_right,
color: Theme.of(context).brightness == Brightness.dark
? AppColors.textSecondaryDark
: AppColors.textSecondary,
size: 16,
),
],
),
);
@@ -402,8 +420,9 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
/// Section contact
Widget _buildContactSection() {
final isDark = Theme.of(context).brightness == Brightness.dark;
return CoreCard(
backgroundColor: AppColors.primaryGreen, // Correction: color -> backgroundColor
backgroundColor: AppColors.primary, // Correction: color -> backgroundColor
child: Column(
children: [
const Icon(Icons.headset_mic_outlined, color: Colors.white, size: 32),
@@ -426,8 +445,8 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
child: UFPrimaryButton(
label: 'EMAIL', // Correction: text -> label
onPressed: () => _contactByEmail(),
backgroundColor: Colors.white,
textColor: AppColors.primaryGreen,
backgroundColor: isDark ? AppColors.surfaceDark : AppColors.surface,
textColor: AppColors.primary,
),
),
const SizedBox(width: 12),
@@ -436,7 +455,7 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
label: 'CHAT', // Correction: text -> label
onPressed: () => _startLiveChat(),
backgroundColor: Colors.white.withOpacity(0.2),
textColor: Colors.white,
textColor: AppColors.onPrimary,
),
),
],
@@ -516,8 +535,8 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
_contactByEmail();
},
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.primaryGreen,
foregroundColor: Colors.white,
backgroundColor: AppColors.primary,
foregroundColor: AppColors.onPrimary,
),
child: const Text('Envoyer un email'),
),
@@ -548,7 +567,7 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
},
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.error,
foregroundColor: Colors.white,
foregroundColor: AppColors.onError,
),
child: const Text('Signaler'),
),
@@ -578,8 +597,8 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
_launchUrl('mailto:support@unionflow.com?subject=Demande de fonctionnalité - UnionFlow Mobile');
},
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.primaryGreen,
foregroundColor: Colors.white,
backgroundColor: AppColors.primary,
foregroundColor: AppColors.onPrimary,
),
child: const Text('Envoyer'),
),
@@ -613,8 +632,8 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
_launchUrl('https://docs.unionflow.com/$guideId');
},
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.primaryGreen,
foregroundColor: Colors.white,
backgroundColor: AppColors.primary,
foregroundColor: AppColors.onPrimary,
),
child: const Text('Voir en ligne'),
),
@@ -644,8 +663,8 @@ class _HelpSupportPageState extends State<HelpSupportPage> {
_contactByEmail();
},
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.primaryGreen,
foregroundColor: Colors.white,
backgroundColor: AppColors.primary,
foregroundColor: AppColors.onPrimary,
),
child: const Text('Contacter le support'),
),