feat(features): refontes onboarding/organizations/profile/reports/settings/solidarity
- onboarding : datasource souscription, models formule/status, bloc complet - organizations : bloc orgs + switcher + types bloc, models, pages edit/create - profile : bloc complet avec change password, delete account, preferences - reports : bloc avec DashboardReports + ScheduleReports + GenerateReport - settings : language, privacy, feedback pages - solidarity : bloc complet demandes d'aide (CRUD, approuver, rejeter)
This commit is contained in:
@@ -62,26 +62,29 @@ class _PrivacySettingsPageState extends State<PrivacySettingsPage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
body: Column(
|
||||
children: [
|
||||
_buildHeader(),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 8),
|
||||
_buildVisibilitySection(),
|
||||
const SizedBox(height: 8),
|
||||
_buildDataSection(),
|
||||
const SizedBox(height: 8),
|
||||
_buildDangerSection(),
|
||||
const SizedBox(height: 80),
|
||||
],
|
||||
body: SafeArea(
|
||||
top: false,
|
||||
child: Column(
|
||||
children: [
|
||||
_buildHeader(),
|
||||
Expanded(
|
||||
child: SingleChildScrollView(
|
||||
padding: const EdgeInsets.all(12),
|
||||
child: Column(
|
||||
children: [
|
||||
const SizedBox(height: 8),
|
||||
_buildVisibilitySection(),
|
||||
const SizedBox(height: 8),
|
||||
_buildDataSection(),
|
||||
const SizedBox(height: 8),
|
||||
_buildDangerSection(),
|
||||
const SizedBox(height: 80),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -91,15 +94,15 @@ class _PrivacySettingsPageState extends State<PrivacySettingsPage> {
|
||||
margin: const EdgeInsets.all(SpacingTokens.lg),
|
||||
padding: const EdgeInsets.all(SpacingTokens.xxl),
|
||||
decoration: BoxDecoration(
|
||||
gradient: const LinearGradient(
|
||||
colors: [AppColors.brandGreen, AppColors.primaryGreen],
|
||||
gradient: LinearGradient(
|
||||
colors: ModuleColors.parametresGradient,
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(SpacingTokens.xl),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: AppColors.primaryGreen.withOpacity(0.3),
|
||||
color: ModuleColors.parametres.withOpacity(0.3),
|
||||
blurRadius: 20,
|
||||
offset: const Offset(0, 8),
|
||||
),
|
||||
@@ -222,13 +225,13 @@ class _PrivacySettingsPageState extends State<PrivacySettingsPage> {
|
||||
child: Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 7),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.red.withOpacity(0.05),
|
||||
color: AppColors.error.withOpacity(0.05),
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
border: Border.all(color: Colors.red.withOpacity(0.2)),
|
||||
border: Border.all(color: AppColors.error.withOpacity(0.2)),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.delete_forever, color: Colors.red, size: 20),
|
||||
const Icon(Icons.delete_forever, color: AppColors.error, size: 20),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
@@ -239,7 +242,7 @@ class _PrivacySettingsPageState extends State<PrivacySettingsPage> {
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: Colors.red,
|
||||
color: AppColors.error,
|
||||
),
|
||||
),
|
||||
Builder(
|
||||
@@ -248,7 +251,7 @@ class _PrivacySettingsPageState extends State<PrivacySettingsPage> {
|
||||
return Text(
|
||||
'Supprimer définitivement toutes vos données',
|
||||
style: AppTypography.subtitleSmall.copyWith(
|
||||
color: isDark ? AppColors.textSecondaryDark : AppColors.textSecondaryLight,
|
||||
color: isDark ? AppColors.textSecondaryDark : AppColors.textSecondary,
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -256,7 +259,7 @@ class _PrivacySettingsPageState extends State<PrivacySettingsPage> {
|
||||
],
|
||||
),
|
||||
),
|
||||
const Icon(Icons.arrow_forward_ios, color: Colors.red, size: 16),
|
||||
const Icon(Icons.arrow_forward_ios, color: AppColors.error, size: 16),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -271,7 +274,7 @@ class _PrivacySettingsPageState extends State<PrivacySettingsPage> {
|
||||
builder: (context) => AlertDialog(
|
||||
title: const Row(
|
||||
children: [
|
||||
Icon(Icons.warning, color: Colors.red),
|
||||
Icon(Icons.warning, color: AppColors.error),
|
||||
SizedBox(width: 8),
|
||||
Text('Supprimer le compte'),
|
||||
],
|
||||
@@ -293,8 +296,8 @@ class _PrivacySettingsPageState extends State<PrivacySettingsPage> {
|
||||
await launchUrl(uri, mode: LaunchMode.externalApplication);
|
||||
}
|
||||
},
|
||||
style: ElevatedButton.styleFrom(backgroundColor: Colors.red),
|
||||
child: const Text('Contacter l\'administrateur', style: TextStyle(color: Colors.white)),
|
||||
style: ElevatedButton.styleFrom(backgroundColor: AppColors.error),
|
||||
child: const Text('Contacter l\'administrateur', style: TextStyle(color: AppColors.onPrimary)),
|
||||
),
|
||||
],
|
||||
),
|
||||
@@ -303,12 +306,12 @@ class _PrivacySettingsPageState extends State<PrivacySettingsPage> {
|
||||
|
||||
Widget _buildSection(String title, String subtitle, IconData icon, List<Widget> children) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
final textPrimary = isDark ? AppColors.textPrimaryDark : AppColors.textPrimaryLight;
|
||||
final textSecondary = isDark ? AppColors.textSecondaryDark : AppColors.textSecondaryLight;
|
||||
final textPrimary = isDark ? AppColors.textPrimaryDark : AppColors.textPrimary;
|
||||
final textSecondary = isDark ? AppColors.textSecondaryDark : AppColors.textSecondary;
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
color: isDark ? AppColors.darkSurface : Colors.white,
|
||||
color: isDark ? AppColors.surfaceDark : AppColors.surface,
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
child: Column(
|
||||
@@ -352,17 +355,17 @@ class _PrivacySettingsPageState extends State<PrivacySettingsPage> {
|
||||
ValueChanged<bool> onChanged,
|
||||
) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
final textPrimary = isDark ? AppColors.textPrimaryDark : AppColors.textPrimaryLight;
|
||||
final textSecondary = isDark ? AppColors.textSecondaryDark : AppColors.textSecondaryLight;
|
||||
final textPrimary = isDark ? AppColors.textPrimaryDark : AppColors.textPrimary;
|
||||
final textSecondary = isDark ? AppColors.textSecondaryDark : AppColors.textSecondary;
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 7),
|
||||
decoration: BoxDecoration(
|
||||
color: isDark ? AppColors.darkBackground : Colors.grey[50],
|
||||
color: isDark ? AppColors.backgroundSubtleDark : AppColors.backgroundSubtle,
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.toggle_on, color: AppColors.primaryGreen, size: 20),
|
||||
const Icon(Icons.toggle_on, color: AppColors.primary, size: 20),
|
||||
const SizedBox(width: 12),
|
||||
Expanded(
|
||||
child: Column(
|
||||
@@ -382,7 +385,7 @@ class _PrivacySettingsPageState extends State<PrivacySettingsPage> {
|
||||
Switch(
|
||||
value: value,
|
||||
onChanged: onChanged,
|
||||
activeTrackColor: AppColors.primaryGreen,
|
||||
activeTrackColor: AppColors.primary,
|
||||
thumbColor: WidgetStateProperty.resolveWith((states) =>
|
||||
states.contains(WidgetState.selected) ? Colors.white : null),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user