Refactoring
This commit is contained in:
@@ -3,6 +3,7 @@ import '../../../../shared/theme/app_theme.dart';
|
||||
import '../../../../core/animations/page_transitions.dart';
|
||||
import '../../../demo/presentation/pages/animations_demo_page.dart';
|
||||
import '../../../debug/debug_api_test_page.dart';
|
||||
import '../../../performance/presentation/pages/performance_demo_page.dart';
|
||||
|
||||
// Imports des nouveaux widgets refactorisés
|
||||
import '../widgets/welcome/welcome_section_widget.dart';
|
||||
@@ -11,6 +12,9 @@ import '../widgets/actions/quick_actions_widget.dart';
|
||||
import '../widgets/activities/recent_activities_widget.dart';
|
||||
import '../widgets/charts/charts_analytics_widget.dart';
|
||||
|
||||
// Import de l'architecture unifiée pour amélioration progressive
|
||||
import '../../../../shared/widgets/common/unified_page_layout.dart';
|
||||
|
||||
/// Page principale du tableau de bord UnionFlow
|
||||
///
|
||||
/// Affiche une vue d'ensemble complète de l'association avec :
|
||||
@@ -27,76 +31,79 @@ class DashboardPage extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: AppTheme.backgroundLight,
|
||||
appBar: AppBar(
|
||||
title: const Text('Tableau de bord'),
|
||||
backgroundColor: AppTheme.primaryColor,
|
||||
elevation: 0,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.animation),
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(
|
||||
PageTransitions.morphWithBlur(const AnimationsDemoPage()),
|
||||
);
|
||||
},
|
||||
tooltip: 'Démonstration des animations',
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.notifications_outlined),
|
||||
onPressed: () {
|
||||
// TODO: Implémenter la navigation vers les notifications
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.bug_report),
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(
|
||||
PageTransitions.slideFromRight(const DebugApiTestPage()),
|
||||
);
|
||||
},
|
||||
tooltip: 'Debug API',
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.settings_outlined),
|
||||
onPressed: () {
|
||||
// TODO: Implémenter la navigation vers les paramètres
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: SafeArea(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// 1. ACCUEIL & CONTEXTE - Message de bienvenue personnalisé
|
||||
const WelcomeSectionWidget(),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// 2. VISION GLOBALE - Indicateurs clés de performance (KPI)
|
||||
// Vue d'ensemble immédiate de la santé de l'association
|
||||
const KPICardsWidget(),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// 3. ACTIONS PRIORITAIRES - Actions rapides et gestion
|
||||
// Accès direct aux tâches critiques quotidiennes
|
||||
const QuickActionsWidget(),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// 4. SUIVI TEMPS RÉEL - Flux d'activités en direct
|
||||
// Monitoring des événements récents et alertes
|
||||
const RecentActivitiesWidget(),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// 5. ANALYSES APPROFONDIES - Graphiques et tendances
|
||||
// Analyses détaillées pour la prise de décision stratégique
|
||||
const ChartsAnalyticsWidget(),
|
||||
],
|
||||
),
|
||||
// Utilisation de UnifiedPageLayout pour améliorer la cohérence
|
||||
// tout en conservant tous les widgets spécialisés existants
|
||||
return UnifiedPageLayout(
|
||||
title: 'Tableau de bord',
|
||||
icon: Icons.dashboard,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.animation),
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(
|
||||
PageTransitions.morphWithBlur(const AnimationsDemoPage()),
|
||||
);
|
||||
},
|
||||
tooltip: 'Démonstration des animations',
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.notifications_outlined),
|
||||
onPressed: () {
|
||||
// TODO: Implémenter la navigation vers les notifications
|
||||
},
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.bug_report),
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(
|
||||
PageTransitions.slideFromRight(const DebugApiTestPage()),
|
||||
);
|
||||
},
|
||||
tooltip: 'Debug API',
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.speed),
|
||||
onPressed: () {
|
||||
Navigator.of(context).push(
|
||||
PageTransitions.slideFromRight(const PerformanceDemoPage()),
|
||||
);
|
||||
},
|
||||
tooltip: 'Performance',
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.settings_outlined),
|
||||
onPressed: () {
|
||||
// TODO: Implémenter la navigation vers les paramètres
|
||||
},
|
||||
),
|
||||
],
|
||||
body: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// 1. ACCUEIL & CONTEXTE - Message de bienvenue personnalisé
|
||||
// CONSERVÉ: Widget spécialisé avec toutes ses fonctionnalités
|
||||
const WelcomeSectionWidget(),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// 2. VISION GLOBALE - Indicateurs clés de performance (KPI)
|
||||
// CONSERVÉ: KPI enrichis avec détails, cibles, périodes
|
||||
const KPICardsWidget(),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// 3. ACTIONS PRIORITAIRES - Actions rapides et gestion
|
||||
// CONSERVÉ: Grille d'actions organisées par catégories
|
||||
const QuickActionsWidget(),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// 4. SUIVI TEMPS RÉEL - Flux d'activités en direct
|
||||
// CONSERVÉ: Activités avec indicateur "Live" et horodatage
|
||||
const RecentActivitiesWidget(),
|
||||
const SizedBox(height: 24),
|
||||
|
||||
// 5. ANALYSES APPROFONDIES - Graphiques et tendances
|
||||
// CONSERVÉ: 1617 lignes de graphiques sophistiqués avec fl_chart
|
||||
const ChartsAnalyticsWidget(),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user