Files
TravelMate/lib/components/settings/settings_content.dart
Van Leemput Dayron 68f546d0e8 Add notification
2025-11-28 19:16:37 +01:00

90 lines
2.5 KiB
Dart

import 'package:flutter/material.dart';
import 'package:travel_mate/components/settings/policies/policies_content.dart';
import 'theme/settings_theme_content.dart';
import 'profile/profile_content.dart';
class SettingsContent extends StatelessWidget {
const SettingsContent({super.key});
Future<void> changePage(BuildContext context, Widget page) async {
Navigator.push(context, MaterialPageRoute(builder: (context) => page));
}
@override
Widget build(BuildContext context) {
return ListView(
padding: const EdgeInsets.all(16),
children: [
// Section Profil intégrée
ProfileContent(),
const SizedBox(height: 20),
// Autres paramètres
Text(
'Préférences',
style: TextStyle(
fontSize: 18,
fontWeight: FontWeight.bold,
color: Colors.grey[600],
),
),
const SizedBox(height: 8),
ListTile(
leading: const Icon(Icons.palette),
title: const Text('Thème'),
subtitle: const Text('Clair, sombre ou système'),
trailing: const Icon(Icons.arrow_forward_ios),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => const SettingsThemeContent(),
),
);
},
),
ListTile(
leading: const Icon(Icons.notifications),
title: const Text('Notifications'),
trailing: const Icon(Icons.arrow_forward_ios),
onTap: () {},
),
ListTile(
leading: const Icon(Icons.privacy_tip),
title: const Text('Confidentialité'),
trailing: const Icon(Icons.arrow_forward_ios),
onTap: () {
changePage(context, const PoliciesContent());
},
),
const SizedBox(height: 30),
Center(
child: Column(
children: [
Text(
'Travel Mate © 2025',
style: TextStyle(fontSize: 16, color: Colors.grey[600]),
),
const SizedBox(height: 4),
Text(
'Version de l\'application',
style: TextStyle(fontSize: 16, color: Colors.grey[600]),
),
const SizedBox(height: 4),
Text(
'1.0.0',
style: TextStyle(fontSize: 14, color: Colors.grey[500]),
),
],
),
),
],
);
}
}