diff --git a/lib/features/home/home_screen.dart b/lib/features/home/home_screen.dart index 2753640..4d03bbd 100644 --- a/lib/features/home/home_screen.dart +++ b/lib/features/home/home_screen.dart @@ -148,21 +148,27 @@ class _HomeScreenState extends State { Text( 'Statistiques', style: Theme.of(context).textTheme.titleLarge?.copyWith( - fontWeight: FontWeight.bold, - ), + fontWeight: FontWeight.bold, + ), ), const SizedBox(height: 12), Row( children: [ + // --- BOUTON SESSIONS (Redirige vers Statistiques) --- Expanded( - child: StatsCard( - icon: Icons.assessment, - title: 'Sessions', - value: '${_stats!['totalSessions']}', - color: AppTheme.primaryColor, + child: InkWell( + onTap: () => _navigateToStatistics(context), + borderRadius: BorderRadius.circular(AppConstants.borderRadius), + child: StatsCard( + icon: Icons.assessment, + title: 'Sessions', + value: '${_stats!['totalSessions']}', + color: AppTheme.primaryColor, + ), ), ), const SizedBox(width: 12), + // Ce bouton reste statique (ou tu peux ajouter une action) Expanded( child: StatsCard( icon: Icons.gps_fixed, @@ -176,15 +182,21 @@ class _HomeScreenState extends State { const SizedBox(height: 12), Row( children: [ + // --- BOUTON SCORE MOYEN (Redirige vers Historique) --- Expanded( - child: StatsCard( - icon: Icons.trending_up, - title: 'Score Moyen', - value: (_stats!['averageScore'] as double).toStringAsFixed(1), - color: AppTheme.warningColor, + child: InkWell( + onTap: () => _navigateToHistory(context), + borderRadius: BorderRadius.circular(AppConstants.borderRadius), + child: StatsCard( + icon: Icons.trending_up, + title: 'Historique', + value: (_stats!['averageScore'] as double).toStringAsFixed(1), + color: AppTheme.warningColor, + ), ), ), const SizedBox(width: 12), + // Ce bouton reste statique Expanded( child: StatsCard( icon: Icons.emoji_events,