Add PoliciesContent component and integrate it into SettingsContent for privacy policy display
This commit is contained in:
@@ -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]),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user