168 lines
5.3 KiB
Dart
168 lines
5.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class AppTheme {
|
|
// Couleurs principales
|
|
static const Color primaryColor = Color(0xFF4B77BE);
|
|
static const Color secondaryColor = Color(0xFF2C3E50);
|
|
static const Color accentColor = Color(0xFF3498DB);
|
|
static const Color backgroundColor = Color(0xFFF5F7FA);
|
|
static const Color cardColor = Colors.white;
|
|
|
|
// Couleurs de texte
|
|
static const Color textPrimaryColor = Color(0xFF2C3E50);
|
|
static const Color textSecondaryColor = Color(0xFF7F8C8D);
|
|
static const Color textLightColor = Color(0xFFBDC3C7);
|
|
|
|
// Couleurs des boutons
|
|
static const Color buttonPrimaryColor = Color(0xFF4B77BE);
|
|
static const Color buttonSecondaryColor = Color(0xFF95A5A6);
|
|
static const Color buttonSuccessColor = Color(0xFF2ECC71);
|
|
static const Color buttonDangerColor = Color(0xFFE74C3C);
|
|
static const Color buttonWarningColor = Color(0xFFF1C40F);
|
|
|
|
// Couleurs des charts
|
|
static const List<Color> chartColors = [
|
|
Color(0xFF4B77BE),
|
|
Color(0xFF2ECC71),
|
|
Color(0xFFE74C3C),
|
|
Color(0xFFF1C40F),
|
|
Color(0xFF9B59B6),
|
|
Color(0xFF1ABC9C),
|
|
Color(0xFFE67E22),
|
|
];
|
|
|
|
// Ombres
|
|
static List<BoxShadow> cardShadow = [
|
|
BoxShadow(
|
|
color: Colors.black.withOpacity(0.05),
|
|
spreadRadius: 1,
|
|
blurRadius: 10,
|
|
offset: const Offset(0, 3),
|
|
),
|
|
];
|
|
|
|
static List<BoxShadow> buttonShadow = [
|
|
BoxShadow(
|
|
color: Colors.black.withOpacity(0.1),
|
|
spreadRadius: 1,
|
|
blurRadius: 5,
|
|
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;
|
|
|
|
// Espacement
|
|
static const double spacingXS = 4.0;
|
|
static const double spacingS = 8.0;
|
|
static const double spacingM = 16.0;
|
|
static const double spacingL = 24.0;
|
|
static const double spacingXL = 32.0;
|
|
static const double spacingXXL = 48.0;
|
|
|
|
// Thème light
|
|
static ThemeData lightTheme = ThemeData(
|
|
useMaterial3: true,
|
|
colorScheme: ColorScheme.light(
|
|
primary: primaryColor,
|
|
secondary: secondaryColor,
|
|
background: backgroundColor,
|
|
surface: cardColor,
|
|
),
|
|
scaffoldBackgroundColor: backgroundColor,
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: primaryColor,
|
|
foregroundColor: Colors.white,
|
|
elevation: 0,
|
|
),
|
|
cardTheme: CardTheme(
|
|
color: cardColor,
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
|
),
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: buttonPrimaryColor,
|
|
foregroundColor: Colors.white,
|
|
elevation: 2,
|
|
padding: const EdgeInsets.symmetric(
|
|
horizontal: spacingL,
|
|
vertical: spacingM,
|
|
),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
|
),
|
|
),
|
|
),
|
|
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: Colors.white,
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
|
borderSide: BorderSide(color: textLightColor),
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
|
borderSide: BorderSide(color: textLightColor),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(borderRadiusMedium),
|
|
borderSide: BorderSide(color: primaryColor),
|
|
),
|
|
contentPadding: const EdgeInsets.symmetric(
|
|
horizontal: spacingM,
|
|
vertical: spacingM,
|
|
),
|
|
),
|
|
textTheme: const TextTheme(
|
|
displayLarge: TextStyle(color: textPrimaryColor),
|
|
displayMedium: TextStyle(color: textPrimaryColor),
|
|
displaySmall: TextStyle(color: textPrimaryColor),
|
|
headlineLarge: TextStyle(color: textPrimaryColor),
|
|
headlineMedium: TextStyle(color: textPrimaryColor),
|
|
headlineSmall: TextStyle(color: textPrimaryColor),
|
|
titleLarge: TextStyle(color: textPrimaryColor),
|
|
titleMedium: TextStyle(color: textPrimaryColor),
|
|
titleSmall: TextStyle(color: textPrimaryColor),
|
|
bodyLarge: TextStyle(color: textPrimaryColor),
|
|
bodyMedium: TextStyle(color: textPrimaryColor),
|
|
bodySmall: TextStyle(color: textSecondaryColor),
|
|
labelLarge: TextStyle(color: textPrimaryColor),
|
|
labelMedium: TextStyle(color: textSecondaryColor),
|
|
labelSmall: TextStyle(color: textSecondaryColor),
|
|
),
|
|
dividerTheme: const DividerThemeData(
|
|
color: Color(0xFFECF0F1),
|
|
thickness: 1,
|
|
space: spacingM,
|
|
),
|
|
);
|
|
}
|