Refactor signup fields and update home page titles; add trip service and model
This commit is contained in:
@@ -27,10 +27,10 @@ class _HomePageState extends State<HomePage> {
|
||||
];
|
||||
|
||||
final List<String> titles = [
|
||||
'Accueil', // 0
|
||||
'Mes voyages', // 0
|
||||
'Paramètres', // 1
|
||||
'Carte', // 2
|
||||
'Mes groupes', // 3
|
||||
'Mes chats', // 3
|
||||
'Comptes', // 4
|
||||
];
|
||||
|
||||
@@ -55,10 +55,9 @@ class _HomePageState extends State<HomePage> {
|
||||
),
|
||||
ListTile(
|
||||
leading: Icon(Icons.home),
|
||||
title: Text("Accueil"),
|
||||
title: Text("Mes voyages"),
|
||||
selected: _currentIndex == 0,
|
||||
onTap: () {
|
||||
print('Clicked Accueil - Setting index to 0'); // Debug
|
||||
setState(() {
|
||||
_currentIndex = 0;
|
||||
});
|
||||
@@ -70,7 +69,6 @@ class _HomePageState extends State<HomePage> {
|
||||
title: Text("Paramètres"),
|
||||
selected: _currentIndex == 1,
|
||||
onTap: () {
|
||||
print('Clicked Paramètres - Setting index to 1'); // Debug
|
||||
setState(() {
|
||||
_currentIndex = 1;
|
||||
});
|
||||
@@ -82,7 +80,6 @@ class _HomePageState extends State<HomePage> {
|
||||
title: Text("Carte"),
|
||||
selected: _currentIndex == 2,
|
||||
onTap: () {
|
||||
print('Clicked Carte - Setting index to 2'); // Debug
|
||||
setState(() {
|
||||
_currentIndex = 2;
|
||||
});
|
||||
@@ -94,7 +91,6 @@ class _HomePageState extends State<HomePage> {
|
||||
title: Text("Mes groupes"),
|
||||
selected: _currentIndex == 3,
|
||||
onTap: () {
|
||||
print('Clicked Groupes - Setting index to 3'); // Debug
|
||||
setState(() {
|
||||
_currentIndex = 3;
|
||||
});
|
||||
@@ -106,7 +102,6 @@ class _HomePageState extends State<HomePage> {
|
||||
title: Text("Comptes"),
|
||||
selected: _currentIndex == 4,
|
||||
onTap: () {
|
||||
print('Clicked Comptes - Setting index to 4'); // Debug
|
||||
setState(() {
|
||||
_currentIndex = 4;
|
||||
});
|
||||
|
||||
@@ -202,21 +202,6 @@ class _SignUpPageState extends State<SignUpPage> {
|
||||
|
||||
const SizedBox(height: 40),
|
||||
|
||||
// Champ Nom
|
||||
TextFormField(
|
||||
controller: _nomController,
|
||||
validator: (value) => _validateField(value, 'Nom'),
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Nom',
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
),
|
||||
prefixIcon: Icon(Icons.person),
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 20),
|
||||
|
||||
// Champ Prénom
|
||||
TextFormField(
|
||||
controller: _prenomController,
|
||||
@@ -232,6 +217,21 @@ class _SignUpPageState extends State<SignUpPage> {
|
||||
|
||||
const SizedBox(height: 20),
|
||||
|
||||
// Champ Nom
|
||||
TextFormField(
|
||||
controller: _nomController,
|
||||
validator: (value) => _validateField(value, 'Nom'),
|
||||
decoration: InputDecoration(
|
||||
labelText: 'Nom',
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.all(Radius.circular(12)),
|
||||
),
|
||||
prefixIcon: Icon(Icons.person),
|
||||
),
|
||||
),
|
||||
|
||||
const SizedBox(height: 20),
|
||||
|
||||
// Champ Email
|
||||
TextFormField(
|
||||
controller: _emailController,
|
||||
|
||||
Reference in New Issue
Block a user