import 'package:flutter/material.dart'; import '../../../../core/constants/colors.dart'; import '../../../../domain/entities/user.dart'; import 'stat_tile.dart'; class StatisticsSectionCard extends StatelessWidget { final User user; const StatisticsSectionCard({Key? key, required this.user}) : super(key: key); @override Widget build(BuildContext context) { return Card( color: AppColors.cardColor, shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)), elevation: 2, child: Padding( padding: const EdgeInsets.all(16.0), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ const Text( 'Statistiques Personnelles', style: TextStyle( fontSize: 20, fontWeight: FontWeight.bold, color: Colors.white, ), ), const SizedBox(height: 10), StatTile(icon: Icons.event, label: 'Événements Participés', value: '${user.eventsCount}'), StatTile(icon: Icons.place, label: 'Établissements Visités', value: '${user.visitedPlacesCount}'), StatTile(icon: Icons.post_add, label: 'Publications', value: '${user.postsCount}'), StatTile(icon: Icons.group, label: 'Amis/Followers', value: '${user.friendsCount}'), ], ), ), ); } }