Implémentation partielle du profil de l'utilisateur

This commit is contained in:
DahoudG
2024-08-27 19:28:44 +00:00
parent 7feb3bf65e
commit 8e0a005918
8 changed files with 452 additions and 54 deletions

View 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,
),
),
);
}
}

View File

@@ -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),
),
);
}
}
}