darkTheme property
ThemeData
get
darkTheme
Implementation
static ThemeData get darkTheme {
final ColorScheme darkColorScheme = ColorScheme.fromSeed(
seedColor: AppColors.primary,
brightness: Brightness.dark,
primary: AppColors.brand300,
onPrimary: AppColors.brand950,
secondary: AppColors.brand200,
surface: AppColors.brand900,
onSurface: AppColors.brand50,
error: const Color(0xFFCF6679),
);
return ThemeData(
useMaterial3: true,
colorScheme: darkColorScheme,
scaffoldBackgroundColor: darkColorScheme.surface,
textTheme: _textTheme(darkColorScheme.onSurface),
appBarTheme: AppBarTheme(
backgroundColor: darkColorScheme.surface,
foregroundColor: darkColorScheme.onSurface,
elevation: 0,
centerTitle: false,
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
elevation: 0,
backgroundColor: darkColorScheme.primary,
foregroundColor: darkColorScheme.onPrimary,
minimumSize: const Size(double.infinity, 48),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
),
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: darkColorScheme.surface,
contentPadding: const EdgeInsets.symmetric(
horizontal: 16,
vertical: 16,
),
hintStyle: TextStyle(
color: AppColors.brand400,
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(
color: AppColors.brand700,
),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(
color: AppColors.brand700,
),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(
color: darkColorScheme.primary,
width: 2,
),
),
),
cardTheme: CardThemeData(
color: darkColorScheme.surface,
elevation: 0,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(16),
side: BorderSide(
color: AppColors.brand800,
),
),
),
dialogTheme: DialogThemeData(
backgroundColor: darkColorScheme.surface,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(20),
),
),
dividerTheme: DividerThemeData(
color: AppColors.brand800,
thickness: 1,
),
);
}