refactoring
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
library adaptive_navigation;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../shared/design_system/tokens/app_colors.dart';
|
||||
import '../../shared/design_system/tokens/color_tokens.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import '../../features/authentication/presentation/bloc/auth_bloc.dart';
|
||||
import '../../features/authentication/data/models/user_role.dart';
|
||||
@@ -125,7 +127,7 @@ class AdaptiveNavigationDrawer extends StatelessWidget {
|
||||
return _buildDrawer(
|
||||
context,
|
||||
'Super Administrateur',
|
||||
const Color(0xFF6C5CE7),
|
||||
AppColors.brandGreen,
|
||||
Icons.admin_panel_settings,
|
||||
items,
|
||||
);
|
||||
@@ -181,7 +183,7 @@ class AdaptiveNavigationDrawer extends StatelessWidget {
|
||||
return _buildDrawer(
|
||||
context,
|
||||
'Administrateur',
|
||||
const Color(0xFF0984E3),
|
||||
AppColors.primaryGreen,
|
||||
Icons.business_center,
|
||||
items,
|
||||
);
|
||||
@@ -225,7 +227,7 @@ class AdaptiveNavigationDrawer extends StatelessWidget {
|
||||
return _buildDrawer(
|
||||
context,
|
||||
'Modérateur',
|
||||
const Color(0xFFE17055),
|
||||
ColorTokens.secondaryDark,
|
||||
Icons.manage_accounts,
|
||||
items,
|
||||
);
|
||||
@@ -275,7 +277,7 @@ class AdaptiveNavigationDrawer extends StatelessWidget {
|
||||
return _buildDrawer(
|
||||
context,
|
||||
'Membre Actif',
|
||||
const Color(0xFF00B894),
|
||||
AppColors.brandGreenLight,
|
||||
Icons.groups,
|
||||
items,
|
||||
);
|
||||
@@ -319,7 +321,7 @@ class AdaptiveNavigationDrawer extends StatelessWidget {
|
||||
return _buildDrawer(
|
||||
context,
|
||||
'Membre',
|
||||
const Color(0xFF00CEC9),
|
||||
ColorTokens.secondary,
|
||||
Icons.person,
|
||||
items,
|
||||
);
|
||||
@@ -363,7 +365,7 @@ class AdaptiveNavigationDrawer extends StatelessWidget {
|
||||
return _buildDrawer(
|
||||
context,
|
||||
'Visiteur',
|
||||
const Color(0xFF6C5CE7),
|
||||
AppColors.brandMint,
|
||||
Icons.waving_hand,
|
||||
items,
|
||||
);
|
||||
@@ -374,7 +376,7 @@ class AdaptiveNavigationDrawer extends StatelessWidget {
|
||||
return _buildDrawer(
|
||||
context,
|
||||
'UnionFlow',
|
||||
Colors.grey,
|
||||
AppColors.textSecondaryLight,
|
||||
Icons.dashboard,
|
||||
[
|
||||
const AdaptiveNavigationItem(
|
||||
@@ -394,7 +396,7 @@ class AdaptiveNavigationDrawer extends StatelessWidget {
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [Color(0xFF6C5CE7), Color(0xFF5A4FCF)],
|
||||
colors: [AppColors.brandGreen, AppColors.primaryGreen],
|
||||
),
|
||||
),
|
||||
child: const Center(
|
||||
@@ -523,7 +525,7 @@ class AdaptiveNavigationDrawer extends StatelessWidget {
|
||||
? Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.red,
|
||||
color: AppColors.error,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
child: Text(
|
||||
@@ -547,10 +549,10 @@ class AdaptiveNavigationDrawer extends StatelessWidget {
|
||||
/// Construit l'élément de déconnexion
|
||||
Widget _buildLogoutItem(BuildContext context) {
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.logout, color: Colors.red),
|
||||
leading: Icon(Icons.logout, color: AppColors.error),
|
||||
title: const Text(
|
||||
'Déconnexion',
|
||||
style: TextStyle(color: Colors.red),
|
||||
style: TextStyle(color: AppColors.error),
|
||||
),
|
||||
onTap: () {
|
||||
Navigator.of(context).pop();
|
||||
|
||||
Reference in New Issue
Block a user