darkTheme top-level property
final
Implementation
final ThemeData darkTheme = ThemeData(
useMaterial3: true,
scaffoldBackgroundColor: darkBackgroundColor,
appBarTheme: AppBarTheme(
color: darkPrimaryColor,
foregroundColor: darkOnPrimaryColor,
),
cardTheme: const CardTheme(
color: darkCardColor,
elevation: 2,
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: darkPrimaryColor,
foregroundColor: darkOnPrimaryColor,
padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 16),
textStyle: GoogleFonts.roboto(
fontSize: 14,
fontWeight: FontWeight.w600,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(15),
),
),
),
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: darkPrimaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(30),
),
),
inputDecorationTheme: InputDecorationTheme(
enabledBorder: OutlineInputBorder(
borderSide: const BorderSide(color: Colors.grey),
borderRadius: BorderRadius.circular(10),
),
focusedBorder: OutlineInputBorder(
borderSide: const BorderSide(color: Colors.white70),
borderRadius: BorderRadius.circular(10),
),
hintStyle: GoogleFonts.roboto(
color: Colors.white54,
fontWeight: FontWeight.w300,
),
contentPadding: const EdgeInsets.all(16),
),
cardColor: darkCardColor,
colorScheme: ColorScheme.dark(
primary: darkPrimaryColor,
onPrimary: darkOnPrimaryColor,
surface: darkBackgroundColor,
onSurface: Colors.white,
error: darkErrorColor,
onError: darkOnErrorColor,
),
textTheme: TextTheme(
displayLarge: GoogleFonts.roboto(color: Colors.white),
displayMedium: GoogleFonts.roboto(color: Colors.white),
displaySmall: GoogleFonts.roboto(color: Colors.white),
headlineLarge: GoogleFonts.roboto(color: Colors.white),
headlineMedium: GoogleFonts.roboto(color: Colors.white),
headlineSmall: GoogleFonts.roboto(color: Colors.white),
titleLarge: GoogleFonts.roboto(color: Colors.white),
titleMedium: GoogleFonts.roboto(color: Colors.white),
titleSmall: GoogleFonts.roboto(color: Colors.white),
bodyLarge: GoogleFonts.roboto(color: Colors.white),
bodyMedium: GoogleFonts.roboto(color: Colors.white),
bodySmall: GoogleFonts.roboto(color: Colors.white),
labelLarge: GoogleFonts.roboto(color: Colors.white),
labelMedium: GoogleFonts.roboto(color: Colors.white),
labelSmall: GoogleFonts.roboto(color: Colors.white),
),
);