feat: Gestion des secteurs et migration v3.0.4+304
- Ajout système complet de gestion des secteurs avec contours géographiques - Import des contours départementaux depuis GeoJSON - API REST pour la gestion des secteurs (/api/sectors) - Service de géolocalisation pour déterminer les secteurs - Migration base de données avec tables x_departements_contours et sectors_adresses - Interface Flutter pour visualisation et gestion des secteurs - Ajout thème sombre dans l'application - Corrections diverses et optimisations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
62
app/lib/core/theme/app_theme.dart
Normal file → Executable file
62
app/lib/core/theme/app_theme.dart
Normal file → Executable file
@@ -7,19 +7,20 @@ class AppTheme {
|
||||
static const Color accentColor = Color(0xFF00E09D); // Vert
|
||||
static const Color errorColor = Color(0xFFE41B13); // Rouge
|
||||
static const Color warningColor = Color(0xFFF7A278); // Orange
|
||||
static const Color backgroundLightColor = Color(0xFFF4F5F6); // Gris très clair
|
||||
static const Color backgroundLightColor =
|
||||
Color(0xFFF4F5F6); // Gris très clair
|
||||
static const Color backgroundDarkColor = Color(0xFF111827);
|
||||
static const Color textLightColor = Color(0xFF000000); // Noir
|
||||
static const Color textDarkColor = Color(0xFFF9FAFB);
|
||||
|
||||
|
||||
// Couleurs de texte supplémentaires
|
||||
static const Color textSecondaryColor = Color(0xFF7F8C8D);
|
||||
static const Color textLightSecondaryColor = Color(0xFFBDC3C7);
|
||||
|
||||
|
||||
// Couleurs des boutons
|
||||
static const Color buttonSuccessColor = Color(0xFF2ECC71);
|
||||
static const Color buttonDangerColor = Color(0xFFE74C3C);
|
||||
|
||||
|
||||
// Couleurs des charts
|
||||
static const List<Color> chartColors = [
|
||||
primaryColor,
|
||||
@@ -30,7 +31,7 @@ class AppTheme {
|
||||
Color(0xFF9B59B6),
|
||||
Color(0xFF1ABC9C),
|
||||
];
|
||||
|
||||
|
||||
// Ombres
|
||||
static List<BoxShadow> cardShadow = [
|
||||
BoxShadow(
|
||||
@@ -40,7 +41,7 @@ class AppTheme {
|
||||
offset: const Offset(0, 3),
|
||||
),
|
||||
];
|
||||
|
||||
|
||||
static List<BoxShadow> buttonShadow = [
|
||||
BoxShadow(
|
||||
color: Colors.black.withOpacity(0.1),
|
||||
@@ -49,14 +50,14 @@ class AppTheme {
|
||||
offset: const Offset(0, 2),
|
||||
),
|
||||
];
|
||||
|
||||
|
||||
// Rayons des bordures
|
||||
static const double borderRadiusSmall = 4.0;
|
||||
static const double borderRadiusMedium = 8.0;
|
||||
static const double borderRadiusLarge = 12.0;
|
||||
static const double borderRadiusXL = 16.0;
|
||||
static const double borderRadiusRounded = 50.0;
|
||||
|
||||
|
||||
// Espacement
|
||||
static const double spacingXS = 4.0;
|
||||
static const double spacingS = 8.0;
|
||||
@@ -71,15 +72,13 @@ class AppTheme {
|
||||
useMaterial3: true,
|
||||
brightness: Brightness.light,
|
||||
fontFamily: 'Figtree',
|
||||
colorScheme: ColorScheme.light(
|
||||
colorScheme: const ColorScheme.light(
|
||||
primary: primaryColor,
|
||||
secondary: secondaryColor,
|
||||
tertiary: accentColor,
|
||||
background: backgroundLightColor,
|
||||
surface: Colors.white,
|
||||
onPrimary: Colors.white,
|
||||
onSecondary: Colors.white,
|
||||
onBackground: textLightColor,
|
||||
onSurface: textLightColor,
|
||||
error: errorColor,
|
||||
),
|
||||
@@ -94,7 +93,8 @@ class AppTheme {
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
padding: const EdgeInsets.symmetric(horizontal: spacingL, vertical: spacingM),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: spacingL, vertical: spacingM),
|
||||
elevation: 2,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(borderRadiusRounded),
|
||||
@@ -110,7 +110,8 @@ class AppTheme {
|
||||
style: OutlinedButton.styleFrom(
|
||||
foregroundColor: primaryColor,
|
||||
side: const BorderSide(color: primaryColor),
|
||||
padding: const EdgeInsets.symmetric(horizontal: spacingL, vertical: spacingM),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: spacingL, vertical: spacingM),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
||||
),
|
||||
@@ -119,7 +120,8 @@ class AppTheme {
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: primaryColor,
|
||||
padding: const EdgeInsets.symmetric(horizontal: spacingM, vertical: spacingS),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: spacingM, vertical: spacingS),
|
||||
),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
@@ -143,7 +145,8 @@ class AppTheme {
|
||||
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
||||
borderSide: const BorderSide(color: primaryColor, width: 2),
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: spacingM, vertical: spacingM),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: spacingM, vertical: spacingM),
|
||||
),
|
||||
cardTheme: CardThemeData(
|
||||
elevation: 2,
|
||||
@@ -166,15 +169,13 @@ class AppTheme {
|
||||
useMaterial3: true,
|
||||
brightness: Brightness.dark,
|
||||
fontFamily: 'Figtree',
|
||||
colorScheme: ColorScheme.dark(
|
||||
colorScheme: const ColorScheme.dark(
|
||||
primary: primaryColor,
|
||||
secondary: secondaryColor,
|
||||
tertiary: accentColor,
|
||||
background: backgroundDarkColor,
|
||||
surface: const Color(0xFF1F2937),
|
||||
surface: Color(0xFF1F2937),
|
||||
onPrimary: Colors.white,
|
||||
onSecondary: Colors.white,
|
||||
onBackground: textDarkColor,
|
||||
onSurface: textDarkColor,
|
||||
error: errorColor,
|
||||
),
|
||||
@@ -189,7 +190,8 @@ class AppTheme {
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
padding: const EdgeInsets.symmetric(horizontal: spacingL, vertical: spacingM),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: spacingL, vertical: spacingM),
|
||||
elevation: 2,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(borderRadiusRounded),
|
||||
@@ -205,7 +207,8 @@ class AppTheme {
|
||||
style: OutlinedButton.styleFrom(
|
||||
foregroundColor: primaryColor,
|
||||
side: const BorderSide(color: primaryColor),
|
||||
padding: const EdgeInsets.symmetric(horizontal: spacingL, vertical: spacingM),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: spacingL, vertical: spacingM),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
||||
),
|
||||
@@ -214,7 +217,8 @@ class AppTheme {
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: primaryColor,
|
||||
padding: const EdgeInsets.symmetric(horizontal: spacingM, vertical: spacingS),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: spacingM, vertical: spacingS),
|
||||
),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
@@ -238,7 +242,8 @@ class AppTheme {
|
||||
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
||||
borderSide: const BorderSide(color: primaryColor, width: 2),
|
||||
),
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: spacingM, vertical: spacingM),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: spacingM, vertical: spacingM),
|
||||
),
|
||||
cardTheme: CardThemeData(
|
||||
elevation: 4,
|
||||
@@ -269,10 +274,13 @@ class AppTheme {
|
||||
titleSmall: TextStyle(fontFamily: 'Figtree', color: textColor),
|
||||
bodyLarge: TextStyle(fontFamily: 'Figtree', color: textColor),
|
||||
bodyMedium: TextStyle(fontFamily: 'Figtree', color: textColor),
|
||||
bodySmall: TextStyle(fontFamily: 'Figtree', color: textColor.withOpacity(0.7)),
|
||||
bodySmall:
|
||||
TextStyle(fontFamily: 'Figtree', color: textColor.withOpacity(0.7)),
|
||||
labelLarge: TextStyle(fontFamily: 'Figtree', color: textColor),
|
||||
labelMedium: TextStyle(fontFamily: 'Figtree', color: textColor.withOpacity(0.7)),
|
||||
labelSmall: TextStyle(fontFamily: 'Figtree', color: textColor.withOpacity(0.7)),
|
||||
labelMedium:
|
||||
TextStyle(fontFamily: 'Figtree', color: textColor.withOpacity(0.7)),
|
||||
labelSmall:
|
||||
TextStyle(fontFamily: 'Figtree', color: textColor.withOpacity(0.7)),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user