Add PoliciesContent component and integrate it into SettingsContent for privacy policy display

This commit is contained in:
Van Leemput Dayron
2025-11-06 12:01:12 +01:00
parent 75bdf591f3
commit 3b633f10e4
2 changed files with 202 additions and 7 deletions

View File

@@ -1,21 +1,20 @@
import 'package:flutter/material.dart';
import 'package:travel_mate/components/settings/policies/policies_content.dart';
import '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: [
const Text(
'Paramètres',
style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
),
const SizedBox(height: 20),
// Section Profil intégrée
const ProfileContent(),
@@ -65,7 +64,31 @@ class SettingsContent extends StatelessWidget {
leading: const Icon(Icons.privacy_tip),
title: const Text('Confidentialité'),
trailing: const Icon(Icons.arrow_forward_ios),
onTap: () {},
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]),
),
],
),
),
],
);