Implémentation partielle du profil de l'utilisateur
This commit is contained in:
38
lib/presentation/reservations/reservations_screen.dart
Normal file
38
lib/presentation/reservations/reservations_screen.dart
Normal file
@@ -0,0 +1,38 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ReservationsScreen extends StatelessWidget {
|
||||
const ReservationsScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Réservations'),
|
||||
backgroundColor: Colors.black,
|
||||
elevation: 0,
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.event, color: Colors.blueAccent),
|
||||
title: const Text('Réservation 1', style: TextStyle(color: Colors.white)),
|
||||
subtitle: const Text('Détails de la réservation 1', style: TextStyle(color: Colors.white70)),
|
||||
onTap: () {
|
||||
// Logique pour afficher les détails de la réservation 1
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.event, color: Colors.blueAccent),
|
||||
title: const Text('Réservation 2', style: TextStyle(color: Colors.white)),
|
||||
subtitle: const Text('Détails de la réservation 2', style: TextStyle(color: Colors.white70)),
|
||||
onTap: () {
|
||||
// Logique pour afficher les détails de la réservation 2
|
||||
},
|
||||
),
|
||||
// Ajoutez d'autres ListTile pour les autres réservations
|
||||
],
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class EstablishmentsScreen extends StatelessWidget {
|
||||
const EstablishmentsScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Center(
|
||||
child: Text(
|
||||
'Établissements',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
19
lib/presentation/screens/home/home_content.dart
Normal file
19
lib/presentation/screens/home/home_content.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class HomeContentScreen extends StatelessWidget {
|
||||
const HomeContentScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return const Center(
|
||||
child: Text(
|
||||
'Accueil',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:afterwork/presentation/screens/event/event_screen.dart';
|
||||
import 'package:afterwork/presentation/screens/profile/profile_screen.dart';
|
||||
import 'package:afterwork/presentation/screens/social/social_screen.dart';
|
||||
import 'package:afterwork/presentation/screens/establishments/establishments_screen.dart';
|
||||
import 'package:afterwork/presentation/screens/home/home_content.dart';
|
||||
|
||||
class HomeScreen extends StatefulWidget {
|
||||
const HomeScreen({super.key});
|
||||
@@ -110,63 +115,15 @@ class _HomeScreenState extends State<HomeScreen> with SingleTickerProviderStateM
|
||||
),
|
||||
body: TabBarView(
|
||||
controller: _tabController,
|
||||
children: [
|
||||
_getSelectedScreen(0),
|
||||
_getSelectedScreen(1),
|
||||
_getSelectedScreen(2),
|
||||
_getSelectedScreen(3),
|
||||
_getSelectedScreen(4),
|
||||
children: const [
|
||||
HomeContentScreen(), // Contenu de l'accueil
|
||||
EventScreen(), // Écran des événements
|
||||
EstablishmentsScreen(), // Écran des établissements
|
||||
SocialScreen(), // Écran social
|
||||
ProfileScreen(), // Écran du profil
|
||||
],
|
||||
),
|
||||
backgroundColor: Colors.black, // Arrière-plan de l'écran en noir
|
||||
);
|
||||
}
|
||||
|
||||
// Cette méthode retourne le widget correspondant à l'index sélectionné
|
||||
Widget _getSelectedScreen(int index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
return const Center(
|
||||
child: Text(
|
||||
'Accueil',
|
||||
style: TextStyle(color: Colors.white, fontSize: 24),
|
||||
),
|
||||
);
|
||||
case 1:
|
||||
return const Center(
|
||||
child: Text(
|
||||
'Événements',
|
||||
style: TextStyle(color: Colors.white, fontSize: 24),
|
||||
),
|
||||
);
|
||||
case 2:
|
||||
return const Center(
|
||||
child: Text(
|
||||
'Établissements',
|
||||
style: TextStyle(color: Colors.white, fontSize: 24),
|
||||
),
|
||||
);
|
||||
case 3:
|
||||
return const Center(
|
||||
child: Text(
|
||||
'Social',
|
||||
style: TextStyle(color: Colors.white, fontSize: 24),
|
||||
),
|
||||
);
|
||||
case 4:
|
||||
return const Center(
|
||||
child: Text(
|
||||
'Profil',
|
||||
style: TextStyle(color: Colors.white, fontSize: 24),
|
||||
),
|
||||
);
|
||||
default:
|
||||
return const Center(
|
||||
child: Text(
|
||||
'Accueil',
|
||||
style: TextStyle(color: Colors.white, fontSize: 24),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
280
lib/presentation/screens/profile/profile_screen.dart
Normal file
280
lib/presentation/screens/profile/profile_screen.dart
Normal file
@@ -0,0 +1,280 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ProfileScreen extends StatelessWidget {
|
||||
const ProfileScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Profil'),
|
||||
backgroundColor: Colors.black,
|
||||
actions: [
|
||||
IconButton(
|
||||
icon: const Icon(Icons.settings),
|
||||
onPressed: () {
|
||||
// Naviguer vers la page des paramètres
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
body: CustomScrollView(
|
||||
slivers: [
|
||||
SliverList(
|
||||
delegate: SliverChildListDelegate([
|
||||
// Informations de l'Utilisateur
|
||||
_buildUserInfoSection(context),
|
||||
const Divider(),
|
||||
// Options de Modification
|
||||
_buildEditOptions(context),
|
||||
const Divider(),
|
||||
// Statistiques Personnelles
|
||||
_buildStatisticsSection(context),
|
||||
const Divider(),
|
||||
// Historique
|
||||
_buildHistorySection(context),
|
||||
const Divider(),
|
||||
// Préférences et Paramètres
|
||||
_buildPreferencesSection(context),
|
||||
const Divider(),
|
||||
// Autres Fonctions
|
||||
_buildSupportSection(context),
|
||||
const Divider(),
|
||||
// Suppression de Compte
|
||||
_buildAccountDeletionSection(context),
|
||||
]),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildUserInfoSection(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
const CircleAvatar(
|
||||
radius: 50,
|
||||
backgroundImage: AssetImage('lib/assets/images/profile_picture.png'), // Remplacer par la photo de profil
|
||||
),
|
||||
const SizedBox(height: 10),
|
||||
const Text(
|
||||
'Nom Prénom',
|
||||
style: TextStyle(fontSize: 22, fontWeight: FontWeight.bold, color: Colors.white),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
const Text(
|
||||
'pseudo',
|
||||
style: TextStyle(fontSize: 16, color: Colors.grey),
|
||||
),
|
||||
const SizedBox(height: 5),
|
||||
const Text(
|
||||
'email@example.com',
|
||||
style: TextStyle(fontSize: 14, color: Colors.grey),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildEditOptions(BuildContext context) {
|
||||
return Column(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.edit, color: Colors.blueAccent),
|
||||
title: const Text('Éditer le profil'),
|
||||
onTap: () {
|
||||
// Naviguer vers la page d'édition de profil
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.camera_alt, color: Colors.blueAccent),
|
||||
title: const Text('Changer la photo de profil'),
|
||||
onTap: () {
|
||||
// Naviguer vers la page de changement de photo de profil
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.lock, color: Colors.blueAccent),
|
||||
title: const Text('Changer le mot de passe'),
|
||||
onTap: () {
|
||||
// Naviguer vers la page de changement de mot de passe
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildStatisticsSection(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: Text(
|
||||
'Statistiques Personnelles',
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, color: Colors.white),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.event, color: Colors.blueAccent),
|
||||
title: const Text('Événements Participés'),
|
||||
trailing: const Text('12'), // Exemple de valeur
|
||||
onTap: () {
|
||||
// Naviguer vers la page des événements participés
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.place, color: Colors.blueAccent),
|
||||
title: const Text('Établissements Visités'),
|
||||
trailing: const Text('8'), // Exemple de valeur
|
||||
onTap: () {
|
||||
// Naviguer vers la page des établissements visités
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.post_add, color: Colors.blueAccent),
|
||||
title: const Text('Publications'),
|
||||
trailing: const Text('24'), // Exemple de valeur
|
||||
onTap: () {
|
||||
// Naviguer vers la page des publications
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.group, color: Colors.blueAccent),
|
||||
title: const Text('Amis/Followers'),
|
||||
trailing: const Text('150'), // Exemple de valeur
|
||||
onTap: () {
|
||||
// Naviguer vers la page des amis ou followers
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildHistorySection(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: Text(
|
||||
'Historique',
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, color: Colors.white),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.event_note, color: Colors.blueAccent),
|
||||
title: const Text('Historique des Événements'),
|
||||
onTap: () {
|
||||
// Naviguer vers l'historique des événements
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.history, color: Colors.blueAccent),
|
||||
title: const Text('Historique des Publications'),
|
||||
onTap: () {
|
||||
// Naviguer vers l'historique des publications
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.bookmark, color: Colors.blueAccent),
|
||||
title: const Text('Historique de Réservations'),
|
||||
onTap: () {
|
||||
// Naviguer vers l'historique des réservations
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildPreferencesSection(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: Text(
|
||||
'Préférences et Paramètres',
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, color: Colors.white),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.privacy_tip, color: Colors.blueAccent),
|
||||
title: const Text('Paramètres de confidentialité'),
|
||||
onTap: () {
|
||||
// Naviguer vers les paramètres de confidentialité
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.notifications, color: Colors.blueAccent),
|
||||
title: const Text('Notifications'),
|
||||
onTap: () {
|
||||
// Naviguer vers les paramètres de notification
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.language, color: Colors.blueAccent),
|
||||
title: const Text('Langue de l\'application'),
|
||||
onTap: () {
|
||||
// Naviguer vers les paramètres de langue
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.format_paint, color: Colors.blueAccent),
|
||||
title: const Text('Thème de l\'application'),
|
||||
onTap: () {
|
||||
// Naviguer vers les paramètres de thème
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildSupportSection(BuildContext context) {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(16.0),
|
||||
child: Text(
|
||||
'Support et Assistance',
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold, color: Colors.white),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.help, color: Colors.blueAccent),
|
||||
title: const Text('Support et Assistance'),
|
||||
onTap: () {
|
||||
// Naviguer vers la page de support
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.article, color: Colors.blueAccent),
|
||||
title: const Text('Conditions d\'utilisation'),
|
||||
onTap: () {
|
||||
// Naviguer vers les conditions d'utilisation
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.privacy_tip, color: Colors.blueAccent),
|
||||
title: const Text('Politique de confidentialité'),
|
||||
onTap: () {
|
||||
// Naviguer vers la politique de confidentialité
|
||||
},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildAccountDeletionSection(BuildContext context) {
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.delete, color: Colors.redAccent),
|
||||
title: const Text(
|
||||
'Supprimer le compte',
|
||||
style: TextStyle(color: Colors.redAccent),
|
||||
),
|
||||
onTap: () {
|
||||
// Implémenter la logique de suppression de compte
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
56
lib/presentation/screens/settings/settings_screen.dart
Normal file
56
lib/presentation/screens/settings/settings_screen.dart
Normal file
@@ -0,0 +1,56 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SettingsScreen extends StatelessWidget {
|
||||
const SettingsScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text('Paramètres'),
|
||||
backgroundColor: Colors.black,
|
||||
elevation: 0,
|
||||
),
|
||||
body: ListView(
|
||||
children: [
|
||||
ListTile(
|
||||
leading: Icon(Icons.account_circle, color: Colors.blueAccent),
|
||||
title: const Text('Compte', style: TextStyle(color: Colors.white)),
|
||||
onTap: () {
|
||||
// Logique pour gérer l'option Compte
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.notifications, color: Colors.blueAccent),
|
||||
title: const Text('Notifications', style: TextStyle(color: Colors.white)),
|
||||
onTap: () {
|
||||
// Logique pour gérer les notifications
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.lock, color: Colors.blueAccent),
|
||||
title: const Text('Sécurité', style: TextStyle(color: Colors.white)),
|
||||
onTap: () {
|
||||
// Logique pour gérer la sécurité
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.help, color: Colors.blueAccent),
|
||||
title: const Text('Aide', style: TextStyle(color: Colors.white)),
|
||||
onTap: () {
|
||||
// Logique pour gérer l'aide
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.info, color: Colors.blueAccent),
|
||||
title: const Text('À propos', style: TextStyle(color: Colors.white)),
|
||||
onTap: () {
|
||||
// Logique pour gérer les informations À propos
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
);
|
||||
}
|
||||
}
|
||||
19
lib/presentation/screens/social/social_screen.dart
Normal file
19
lib/presentation/screens/social/social_screen.dart
Normal file
@@ -0,0 +1,19 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class SocialScreen extends StatelessWidget {
|
||||
const SocialScreen({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'Social',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user