Refactoring + Checkpoint
This commit is contained in:
@@ -28,12 +28,13 @@ class AppColors {
|
||||
static const Color darkTextSecondary = Color(0xFFBDBDBD);
|
||||
static const Color darkCardColor = Color(0xFF2C2C2C);
|
||||
static const Color darkAccentColor = Color(0xFF81C784);
|
||||
static const Color darkError = Color(0xFFCF6679);
|
||||
static const Color darkError = Color(0xFFF1012B);
|
||||
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);
|
||||
static const Color darkbackgroundCustom = Color(0xFF2C2C3E);
|
||||
static const Color lightbackgroundCustom = Color(0xFFE0F7FA);
|
||||
|
||||
// Sélection automatique des couleurs en fonction du mode de thème
|
||||
static Color get primary => isDarkMode() ? darkPrimary : lightPrimary;
|
||||
@@ -49,11 +50,11 @@ 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;
|
||||
static Color get customBackgroundColor => isDarkMode() ? darkbackgroundCustom : lightbackgroundCustom;
|
||||
|
||||
/// Méthode utilitaire pour vérifier si le mode sombre est activé.
|
||||
static bool isDarkMode() {
|
||||
final brightness = WidgetsBinding.instance.platformDispatcher.platformBrightness;
|
||||
return brightness == Brightness.dark;
|
||||
return brightness == Brightness.light;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class Urls {
|
||||
static const String baseUrl = 'http://192.168.1.145:8085';
|
||||
static const String baseUrl = 'http://192.168.1.16:8080';
|
||||
|
||||
// Authentication and Users Endpoints
|
||||
static const String authenticateUser = '$baseUrl/users/authenticate';
|
||||
|
||||
Reference in New Issue
Block a user