Refactoring + Version améliorée

This commit is contained in:
DahoudG
2024-09-25 21:28:04 +00:00
parent 6b12cfeb41
commit 8e625c1080
28 changed files with 1113 additions and 261 deletions

View File

@@ -16,6 +16,7 @@ class AppColors {
static const Color lightError = Color(0xFFB00020);
static const Color lightIconPrimary = Color(0xFF212121); // Icône primaire sombre
static const Color lightIconSecondary = Color(0xFF757575); // Icône secondaire gris clair
// Thème sombre
static const Color darkPrimary = Color(0xFF121212);
static const Color darkSecondary = Color(0xFFFF5722);
@@ -31,6 +32,9 @@ class AppColors {
static const Color darkIconPrimary = Colors.white; // Icône primaire blanche
static const Color darkIconSecondary = Color(0xFFBDBDBD); // Icône secondaire gris clair
// Ajout du background personnalisé
static const Color backgroundCustom = Color(0xFF2C2C3E);
// Sélection automatique des couleurs en fonction du mode de thème
static Color get primary => isDarkMode() ? darkPrimary : lightPrimary;
static Color get secondary => isDarkMode() ? darkSecondary : lightSecondary;
@@ -45,6 +49,7 @@ class AppColors {
static Color get errorColor => isDarkMode() ? darkError : lightError;
static Color get iconPrimary => isDarkMode() ? darkIconPrimary : lightIconPrimary;
static Color get iconSecondary => isDarkMode() ? darkIconSecondary : lightIconSecondary;
static Color get customBackgroundColor => backgroundCustom;
/// Méthode utilitaire pour vérifier si le mode sombre est activé.
static bool isDarkMode() {

View File

@@ -17,6 +17,7 @@ class Urls {
static const String removeParticipant = '$baseUrl/events'; // Append '/{id}/participants/{userId}' dynamically
static const String getNumberOfParticipants = '$baseUrl/events'; // Append '/{id}/participants/count' dynamically
static const String closeEvent = '$baseUrl/events'; // Append '/{id}/close' dynamically
static const String reopenEvent = '$baseUrl/events'; // Append '/{id}/reopen' dynamically
static const String updateEvent = '$baseUrl/events'; // Append '/{id}' dynamically
static const String updateEventImage = '$baseUrl/events'; // Append '/{id}/image' dynamically
static const String getAllEvents = '$baseUrl/events';