feat: Poids police inputs w600 + suppression thème dark
- Augmentation poids police inputs : w500 → w600 (semi-bold) - bodyLarge w600 dans _getTextTheme (statique) - bodyLarge w600 dans getResponsiveTextTheme (responsive) - Suppression complète du thème dark inutilisé (~95 lignes) - Suppression constantes backgroundDarkColor et textDarkColor - Application forcée sur tous les TextFormField/TextField Amélioration de la lisibilité des champs de saisie. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -37,9 +37,7 @@ class AppTheme {
|
|||||||
static const Color warningColor = Color(0xFFF7A278); // Orange
|
static const Color warningColor = Color(0xFFF7A278); // Orange
|
||||||
static const Color backgroundLightColor =
|
static const Color backgroundLightColor =
|
||||||
Color(0xFFF4F5F6); // Gris très clair
|
Color(0xFFF4F5F6); // Gris très clair
|
||||||
static const Color backgroundDarkColor = Color(0xFF111827);
|
|
||||||
static const Color textLightColor = Color(0xFF000000); // Noir
|
static const Color textLightColor = Color(0xFF000000); // Noir
|
||||||
static const Color textDarkColor = Color(0xFFF9FAFB);
|
|
||||||
|
|
||||||
// Couleurs de texte supplémentaires
|
// Couleurs de texte supplémentaires
|
||||||
static const Color textSecondaryColor = Color(0xFF7F8C8D);
|
static const Color textSecondaryColor = Color(0xFF7F8C8D);
|
||||||
@@ -191,103 +189,6 @@ class AppTheme {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thème sombre
|
|
||||||
static ThemeData get darkTheme {
|
|
||||||
return ThemeData(
|
|
||||||
useMaterial3: true,
|
|
||||||
brightness: Brightness.dark,
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
colorScheme: const ColorScheme.dark(
|
|
||||||
primary: primaryColor,
|
|
||||||
secondary: secondaryColor,
|
|
||||||
tertiary: accentColor,
|
|
||||||
surface: Color(0xFF1F2937),
|
|
||||||
onPrimary: Colors.white,
|
|
||||||
onSecondary: Colors.white,
|
|
||||||
onSurface: textDarkColor,
|
|
||||||
error: errorColor,
|
|
||||||
),
|
|
||||||
scaffoldBackgroundColor: backgroundDarkColor,
|
|
||||||
textTheme: _getTextTheme(textDarkColor),
|
|
||||||
appBarTheme: const AppBarTheme(
|
|
||||||
backgroundColor: Color(0xFF1F2937),
|
|
||||||
foregroundColor: Colors.white,
|
|
||||||
elevation: 0,
|
|
||||||
),
|
|
||||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
backgroundColor: primaryColor,
|
|
||||||
foregroundColor: Colors.white,
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
horizontal: spacingL, vertical: spacingM),
|
|
||||||
elevation: 2,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(borderRadiusRounded),
|
|
||||||
),
|
|
||||||
textStyle: const TextStyle(
|
|
||||||
fontFamily: 'Inter',
|
|
||||||
fontSize: 18,
|
|
||||||
fontWeight: FontWeight.w600,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
outlinedButtonTheme: OutlinedButtonThemeData(
|
|
||||||
style: OutlinedButton.styleFrom(
|
|
||||||
foregroundColor: primaryColor,
|
|
||||||
side: const BorderSide(color: primaryColor),
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
horizontal: spacingL, vertical: spacingM),
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
textButtonTheme: TextButtonThemeData(
|
|
||||||
style: TextButton.styleFrom(
|
|
||||||
foregroundColor: primaryColor,
|
|
||||||
padding: const EdgeInsets.symmetric(
|
|
||||||
horizontal: spacingM, vertical: spacingS),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
inputDecorationTheme: InputDecorationTheme(
|
|
||||||
filled: true,
|
|
||||||
fillColor: const Color(0xFF374151),
|
|
||||||
border: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: textDarkColor.withOpacity(0.1),
|
|
||||||
width: 1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
enabledBorder: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
|
||||||
borderSide: BorderSide(
|
|
||||||
color: textDarkColor.withOpacity(0.1),
|
|
||||||
width: 1,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
focusedBorder: OutlineInputBorder(
|
|
||||||
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
|
||||||
borderSide: const BorderSide(color: primaryColor, width: 2),
|
|
||||||
),
|
|
||||||
contentPadding: const EdgeInsets.symmetric(
|
|
||||||
horizontal: spacingM, vertical: spacingM),
|
|
||||||
),
|
|
||||||
cardTheme: CardTheme(
|
|
||||||
elevation: 4,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(borderRadiusXL),
|
|
||||||
),
|
|
||||||
color: const Color(0xFF1F2937),
|
|
||||||
),
|
|
||||||
dividerTheme: DividerThemeData(
|
|
||||||
color: textDarkColor.withOpacity(0.1),
|
|
||||||
thickness: 1,
|
|
||||||
space: spacingM,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Méthode helper pour générer le TextTheme responsive
|
// Méthode helper pour générer le TextTheme responsive
|
||||||
static TextTheme getResponsiveTextTheme(BuildContext context, Color textColor) {
|
static TextTheme getResponsiveTextTheme(BuildContext context, Color textColor) {
|
||||||
final scaleFactor = getFontScaleFactor(MediaQuery.of(context).size.width);
|
final scaleFactor = getFontScaleFactor(MediaQuery.of(context).size.width);
|
||||||
@@ -348,10 +249,10 @@ class AppTheme {
|
|||||||
|
|
||||||
// Body styles (texte principal)
|
// Body styles (texte principal)
|
||||||
bodyLarge: TextStyle(
|
bodyLarge: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
color: textColor,
|
color: textColor,
|
||||||
fontSize: 16 * scaleFactor,
|
fontSize: 16 * scaleFactor,
|
||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
bodyMedium: TextStyle(
|
bodyMedium: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
@@ -360,9 +261,10 @@ class AppTheme {
|
|||||||
fontWeight: FontWeight.w500,
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
bodySmall: TextStyle(
|
bodySmall: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
color: textColor.withOpacity(0.7),
|
color: textColor.withOpacity(0.7),
|
||||||
fontSize: 12 * scaleFactor,
|
fontSize: 12 * scaleFactor,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
|
|
||||||
// Label styles (petits textes, boutons)
|
// Label styles (petits textes, boutons)
|
||||||
@@ -373,14 +275,16 @@ class AppTheme {
|
|||||||
fontWeight: FontWeight.w600,
|
fontWeight: FontWeight.w600,
|
||||||
),
|
),
|
||||||
labelMedium: TextStyle(
|
labelMedium: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
color: textColor.withOpacity(0.7),
|
color: textColor.withOpacity(0.7),
|
||||||
fontSize: 12 * scaleFactor,
|
fontSize: 12 * scaleFactor,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
labelSmall: TextStyle(
|
labelSmall: TextStyle(
|
||||||
fontFamily: 'Inter',
|
fontFamily: 'Inter',
|
||||||
color: textColor.withOpacity(0.7),
|
color: textColor.withOpacity(0.7),
|
||||||
fontSize: 11 * scaleFactor,
|
fontSize: 11 * scaleFactor,
|
||||||
|
fontWeight: FontWeight.w500,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -397,12 +301,12 @@ class AppTheme {
|
|||||||
titleLarge: TextStyle(fontFamily: 'Inter', color: textColor, fontSize: 22),
|
titleLarge: TextStyle(fontFamily: 'Inter', color: textColor, fontSize: 22),
|
||||||
titleMedium: TextStyle(fontFamily: 'Inter', color: textColor, fontSize: 16, fontWeight: FontWeight.w600),
|
titleMedium: TextStyle(fontFamily: 'Inter', color: textColor, fontSize: 16, fontWeight: FontWeight.w600),
|
||||||
titleSmall: TextStyle(fontFamily: 'Inter', color: textColor, fontSize: 14, fontWeight: FontWeight.w600),
|
titleSmall: TextStyle(fontFamily: 'Inter', color: textColor, fontSize: 14, fontWeight: FontWeight.w600),
|
||||||
bodyLarge: TextStyle(fontFamily: 'Inter', color: textColor, fontSize: 16, fontWeight: FontWeight.w500),
|
bodyLarge: TextStyle(fontFamily: 'Inter', color: textColor, fontSize: 16, fontWeight: FontWeight.w600),
|
||||||
bodyMedium: TextStyle(fontFamily: 'Inter', color: textColor, fontSize: 14, fontWeight: FontWeight.w500),
|
bodyMedium: TextStyle(fontFamily: 'Inter', color: textColor, fontSize: 14, fontWeight: FontWeight.w500),
|
||||||
bodySmall: TextStyle(fontFamily: 'Inter', color: textColor.withOpacity(0.7), fontSize: 12),
|
bodySmall: TextStyle(fontFamily: 'Inter', color: textColor.withOpacity(0.7), fontSize: 12, fontWeight: FontWeight.w500),
|
||||||
labelLarge: TextStyle(fontFamily: 'Inter', color: textColor, fontSize: 14, fontWeight: FontWeight.w600),
|
labelLarge: TextStyle(fontFamily: 'Inter', color: textColor, fontSize: 14, fontWeight: FontWeight.w600),
|
||||||
labelMedium: TextStyle(fontFamily: 'Inter', color: textColor.withOpacity(0.7), fontSize: 12),
|
labelMedium: TextStyle(fontFamily: 'Inter', color: textColor.withOpacity(0.7), fontSize: 12, fontWeight: FontWeight.w500),
|
||||||
labelSmall: TextStyle(fontFamily: 'Inter', color: textColor.withOpacity(0.7), fontSize: 11),
|
labelSmall: TextStyle(fontFamily: 'Inter', color: textColor.withOpacity(0.7), fontSize: 11, fontWeight: FontWeight.w500),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user