First commit
This commit is contained in:
24
lib/components/home/home_content.dart
Normal file
24
lib/components/home/home_content.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class HomeContent extends StatelessWidget {
|
||||
const HomeContent({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Icon(Icons.home, size: 80, color: Colors.blue),
|
||||
SizedBox(height: 20),
|
||||
Text(
|
||||
'Bienvenue sur Travel Mate',
|
||||
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
Text('Page d\'accueil'),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
32
lib/components/profile/profile_content.dart
Normal file
32
lib/components/profile/profile_content.dart
Normal file
@@ -0,0 +1,32 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ProfileContent extends StatelessWidget {
|
||||
const ProfileContent({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Center(
|
||||
child: Column(
|
||||
children: [
|
||||
CircleAvatar(
|
||||
radius: 50,
|
||||
backgroundColor: Colors.blue,
|
||||
child: Icon(Icons.person, size: 50, color: Colors.white),
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
Text(
|
||||
'Nom d\'utilisateur',
|
||||
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
Text('email@example.com'),
|
||||
SizedBox(height: 30),
|
||||
ElevatedButton(onPressed: () {}, child: Text('Modifier le profil')),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
61
lib/components/settings/settings_content.dart
Normal file
61
lib/components/settings/settings_content.dart
Normal file
@@ -0,0 +1,61 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'settings_theme_content.dart';
|
||||
|
||||
class SettingsContent extends StatelessWidget {
|
||||
const SettingsContent({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ListView(
|
||||
padding: EdgeInsets.all(16),
|
||||
children: [
|
||||
Text(
|
||||
'Paramètres',
|
||||
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
|
||||
ListTile(
|
||||
leading: Icon(Icons.palette),
|
||||
title: Text('Thème'),
|
||||
subtitle: Text('Clair, sombre ou système'),
|
||||
trailing: Icon(Icons.arrow_forward_ios),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => SettingsThemeContent()),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
ListTile(
|
||||
leading: Icon(Icons.person),
|
||||
title: Text('Profil'),
|
||||
trailing: Icon(Icons.arrow_forward_ios),
|
||||
onTap: () {},
|
||||
),
|
||||
|
||||
ListTile(
|
||||
leading: Icon(Icons.notifications),
|
||||
title: Text('Notifications'),
|
||||
trailing: Icon(Icons.arrow_forward_ios),
|
||||
onTap: () {},
|
||||
),
|
||||
|
||||
ListTile(
|
||||
leading: Icon(Icons.language),
|
||||
title: Text('Langue'),
|
||||
trailing: Icon(Icons.arrow_forward_ios),
|
||||
onTap: () {},
|
||||
),
|
||||
|
||||
ListTile(
|
||||
leading: Icon(Icons.privacy_tip),
|
||||
title: Text('Confidentialité'),
|
||||
trailing: Icon(Icons.arrow_forward_ios),
|
||||
onTap: () {},
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
}
|
||||
111
lib/components/settings/settings_theme_content.dart
Normal file
111
lib/components/settings/settings_theme_content.dart
Normal file
@@ -0,0 +1,111 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../../providers/theme_provider.dart';
|
||||
|
||||
class SettingsThemeContent extends StatelessWidget {
|
||||
const SettingsThemeContent({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text('Thème'),
|
||||
backgroundColor: Theme.of(context).colorScheme.inversePrimary,
|
||||
),
|
||||
body: Consumer<ThemeProvider>(
|
||||
builder: (context, themeProvider, child) {
|
||||
return ListView(
|
||||
padding: EdgeInsets.all(16),
|
||||
children: [
|
||||
Text(
|
||||
'Choisir le thème',
|
||||
style: Theme.of(context).textTheme.headlineSmall,
|
||||
),
|
||||
SizedBox(height: 20),
|
||||
|
||||
// Option Système
|
||||
RadioListTile<ThemeMode>(
|
||||
title: Text('Système'),
|
||||
subtitle: Text('Suit les paramètres de votre appareil'),
|
||||
value: ThemeMode.system,
|
||||
groupValue: themeProvider.themeMode,
|
||||
onChanged: (ThemeMode? value) {
|
||||
if (value != null) {
|
||||
themeProvider.setThemeMode(value);
|
||||
}
|
||||
},
|
||||
secondary: Icon(Icons.brightness_auto),
|
||||
),
|
||||
|
||||
// Option Clair
|
||||
RadioListTile<ThemeMode>(
|
||||
title: Text('Clair'),
|
||||
subtitle: Text('Thème clair en permanence'),
|
||||
value: ThemeMode.light,
|
||||
groupValue: themeProvider.themeMode,
|
||||
onChanged: (ThemeMode? value) {
|
||||
if (value != null) {
|
||||
themeProvider.setThemeMode(value);
|
||||
}
|
||||
},
|
||||
secondary: Icon(Icons.light_mode),
|
||||
),
|
||||
|
||||
// Option Sombre
|
||||
RadioListTile<ThemeMode>(
|
||||
title: Text('Sombre'),
|
||||
subtitle: Text('Thème sombre en permanence'),
|
||||
value: ThemeMode.dark,
|
||||
groupValue: themeProvider.themeMode,
|
||||
onChanged: (ThemeMode? value) {
|
||||
if (value != null) {
|
||||
themeProvider.setThemeMode(value);
|
||||
}
|
||||
},
|
||||
secondary: Icon(Icons.dark_mode),
|
||||
),
|
||||
|
||||
SizedBox(height: 30),
|
||||
|
||||
// Aperçu du thème actuel
|
||||
Card(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(16),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'Aperçu',
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
),
|
||||
SizedBox(height: 10),
|
||||
Row(
|
||||
children: [
|
||||
Icon(
|
||||
themeProvider.isDarkMode
|
||||
? Icons.dark_mode
|
||||
: Icons.light_mode,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
SizedBox(width: 10),
|
||||
Text(
|
||||
themeProvider.isDarkMode
|
||||
? 'Mode sombre actif'
|
||||
: 'Mode clair actif',
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).colorScheme.onSurface,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user