191 lines
7.0 KiB
Dart
191 lines
7.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class AppTheme {
|
|
// Couleurs du thème basées sur la maquette Figma
|
|
static const Color primaryColor = Color(0xFF20335E); // Bleu foncé
|
|
static const Color secondaryColor = Color(0xFF9DC7C8); // Bleu clair
|
|
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 backgroundDarkColor = Color(0xFF111827);
|
|
static const Color textLightColor = Color(0xFF000000); // Noir
|
|
static const Color textDarkColor = Color(0xFFF9FAFB);
|
|
|
|
// Thème clair
|
|
static ThemeData get lightTheme {
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.light,
|
|
fontFamily: 'Figtree', // Utilisation directe de la police locale
|
|
colorScheme: ColorScheme.light(
|
|
primary: primaryColor,
|
|
secondary: secondaryColor,
|
|
tertiary: accentColor,
|
|
background: backgroundLightColor,
|
|
surface: Colors.white,
|
|
onPrimary: Colors.white,
|
|
onSecondary: Colors.white,
|
|
onBackground: textLightColor,
|
|
onSurface: textLightColor,
|
|
),
|
|
textTheme: const TextTheme().copyWith(
|
|
displayLarge: const TextStyle(fontFamily: 'Figtree'),
|
|
displayMedium: const TextStyle(fontFamily: 'Figtree'),
|
|
displaySmall: const TextStyle(fontFamily: 'Figtree'),
|
|
headlineLarge: const TextStyle(fontFamily: 'Figtree'),
|
|
headlineMedium: const TextStyle(fontFamily: 'Figtree'),
|
|
headlineSmall: const TextStyle(fontFamily: 'Figtree'),
|
|
titleLarge: const TextStyle(fontFamily: 'Figtree'),
|
|
titleMedium: const TextStyle(fontFamily: 'Figtree'),
|
|
titleSmall: const TextStyle(fontFamily: 'Figtree'),
|
|
bodyLarge: const TextStyle(fontFamily: 'Figtree'),
|
|
bodyMedium: const TextStyle(fontFamily: 'Figtree'),
|
|
bodySmall: const TextStyle(fontFamily: 'Figtree'),
|
|
labelLarge: const TextStyle(fontFamily: 'Figtree'),
|
|
labelMedium: const TextStyle(fontFamily: 'Figtree'),
|
|
labelSmall: const TextStyle(fontFamily: 'Figtree'),
|
|
),
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: primaryColor,
|
|
foregroundColor: Colors.white,
|
|
elevation: 0,
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: primaryColor,
|
|
foregroundColor: Colors.white,
|
|
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(50),
|
|
),
|
|
textStyle: const TextStyle(
|
|
fontFamily: 'Figtree',
|
|
fontSize: 18,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
),
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
filled: true,
|
|
fillColor: backgroundLightColor,
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide: BorderSide(
|
|
color: textLightColor.withOpacity(0.1),
|
|
width: 1,
|
|
),
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide: BorderSide(
|
|
color: textLightColor.withOpacity(0.1),
|
|
width: 1,
|
|
),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide: const BorderSide(color: primaryColor, width: 2),
|
|
),
|
|
contentPadding:
|
|
const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
),
|
|
cardTheme: CardTheme(
|
|
elevation: 2,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
// Thème sombre
|
|
static ThemeData get darkTheme {
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.dark,
|
|
fontFamily: 'Figtree', // Utilisation directe de la police locale
|
|
colorScheme: ColorScheme.dark(
|
|
primary: primaryColor,
|
|
secondary: secondaryColor,
|
|
tertiary: accentColor,
|
|
background: backgroundDarkColor,
|
|
surface: const Color(0xFF1F2937),
|
|
onPrimary: Colors.white,
|
|
onSecondary: Colors.white,
|
|
onBackground: textDarkColor,
|
|
onSurface: textDarkColor,
|
|
),
|
|
textTheme: const TextTheme().copyWith(
|
|
displayLarge: const TextStyle(fontFamily: 'Figtree'),
|
|
displayMedium: const TextStyle(fontFamily: 'Figtree'),
|
|
displaySmall: const TextStyle(fontFamily: 'Figtree'),
|
|
headlineLarge: const TextStyle(fontFamily: 'Figtree'),
|
|
headlineMedium: const TextStyle(fontFamily: 'Figtree'),
|
|
headlineSmall: const TextStyle(fontFamily: 'Figtree'),
|
|
titleLarge: const TextStyle(fontFamily: 'Figtree'),
|
|
titleMedium: const TextStyle(fontFamily: 'Figtree'),
|
|
titleSmall: const TextStyle(fontFamily: 'Figtree'),
|
|
bodyLarge: const TextStyle(fontFamily: 'Figtree'),
|
|
bodyMedium: const TextStyle(fontFamily: 'Figtree'),
|
|
bodySmall: const TextStyle(fontFamily: 'Figtree'),
|
|
labelLarge: const TextStyle(fontFamily: 'Figtree'),
|
|
labelMedium: const TextStyle(fontFamily: 'Figtree'),
|
|
labelSmall: const TextStyle(fontFamily: 'Figtree'),
|
|
),
|
|
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: 24, vertical: 16),
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(50),
|
|
),
|
|
textStyle: const TextStyle(
|
|
fontFamily: 'Figtree',
|
|
fontSize: 18,
|
|
fontWeight: FontWeight.w500,
|
|
),
|
|
),
|
|
),
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
filled: true,
|
|
fillColor: const Color(0xFF374151),
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide: BorderSide(
|
|
color: textDarkColor.withOpacity(0.1),
|
|
width: 1,
|
|
),
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide: BorderSide(
|
|
color: textDarkColor.withOpacity(0.1),
|
|
width: 1,
|
|
),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(8),
|
|
borderSide: const BorderSide(color: primaryColor, width: 2),
|
|
),
|
|
contentPadding:
|
|
const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
|
),
|
|
cardTheme: CardTheme(
|
|
elevation: 4,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
),
|
|
color: const Color(0xFF1F2937),
|
|
),
|
|
);
|
|
}
|
|
}
|