lightTheme property
Implementation
static ThemeData lightTheme = ThemeData(
brightness: Brightness.light,
scaffoldBackgroundColor: Colors.white,
primaryColor: AppColors.indigo,
dividerColor: AppColors.grey.s100,
colorScheme: ColorScheme.light(
primary: AppColors.indigo,
secondary: AppColors.indigo.s400,
surface: Colors.white,
error: AppColors.red.s500,
),
textTheme: _createTextTheme(AppColors.grey.s800),
cardTheme: CardTheme(
elevation: AppSpacing.sm,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(AppSpacing.sm),
side: BorderSide(color: AppColors.gray.s50, width: 1),
),
color: Colors.white,
surfaceTintColor: Colors.transparent,
shadowColor: AppColors.slate.withValues(alpha: .3),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: _createElevatedButtonStyle(
backgroundColor: AppColors.indigo,
foregroundColor: Colors.white,
side: BorderSide(color: AppColors.indigo.s600, width: 1),
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: _createOutlinedButtonStyle(
foregroundColor: Colors.black,
backgroundColor: Colors.white,
side: BorderSide(color: Colors.grey.shade300, width: 1),
),
),
textButtonTheme: TextButtonThemeData(
style: ButtonStyle(
padding: WidgetStateProperty.all(AppSizes.getPadding(ComponentSize.md)),
textStyle: WidgetStateProperty.all(AppTypography.labelLarge),
foregroundColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.hovered)) {
return AppColors.gray.s900;
}
return AppColors.gray;
}),
backgroundColor: WidgetStateProperty.all(Colors.transparent),
overlayColor: WidgetStateProperty.all(Colors.transparent),
splashFactory: NoSplash.splashFactory,
side: WidgetStateProperty.all(BorderSide.none),
),
),
textSelectionTheme: TextSelectionThemeData(
cursorColor: AppColors.indigo.s400,
selectionColor: AppColors.indigo.s400,
selectionHandleColor: AppColors.indigo.s400,
),
inputDecorationTheme: _createInputDecorationTheme(
fillColor: Colors.white,
hintColor: AppColors.gray.s300,
enabledBorderColor: AppColors.gray.s300,
focusedBorderColor: AppColors.indigo.s400,
errorBorderColor: AppColors.red.s300,
disabledFillColor: AppColors.gray.s100,
),
switchTheme: _createSwitchThemeData(
selectedThumbColor: AppColors.indigo,
unselectedThumbColor: AppColors.gray.s200,
selectedTrackColor: Colors.white,
unselectedTrackColor: Colors.white,
selectedTrackBorderColor: AppColors.indigo,
unselectedTrackBorderColor: AppColors.gray.s300,
disabledThumbColor: AppColors.gray.s200,
disabledTrackColor: AppColors.gray.s200,
disabledTrackBorderColor: AppColors.gray.s300,
),
iconTheme: IconThemeData(
color: AppColors.grey.s800, // Couleur d'icône par défaut en mode clair
),
);