Bon checkpoint + refactoring

This commit is contained in:
DahoudG
2024-11-02 22:37:47 +00:00
parent 9cf96b7acf
commit 19f6efa995
27 changed files with 684 additions and 499 deletions

View File

@@ -0,0 +1,40 @@
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}'),
],
),
),
);
}
}