dark static method
A default dark theme.
Implementation
static ThemeData dark({String? fontFamily}) => ThemeData(
fontFamily: fontFamily,
tabBarTheme: TabBarTheme(labelColor: _darkColorScheme.onBackground),
brightness: Brightness.dark,
splashFactory: NoSplash.splashFactory,
primaryColor: _darkColorScheme.primary,
canvasColor: _darkColorScheme.background,
scaffoldBackgroundColor: _darkColorScheme.background,
cardColor: _darkColorScheme.surface,
dividerTheme: DividerThemeData(
color: _darkColorScheme.onSurface.withOpacity(0.12),
),
dialogBackgroundColor: _darkColorScheme.background,
dialogTheme: DialogTheme(
backgroundColor: _darkColorScheme.background,
shape: getDialogShape(),
),
textTheme: getTextTheme(Brightness.dark),
indicatorColor: _darkColorScheme.secondary,
applyElevationOverlayColor: true,
buttonTheme: _buttonThemeData,
textButtonTheme: _darkTextButtonThemeData,
elevatedButtonTheme: _getElevatedButtonThemeData(Brightness.dark),
outlinedButtonTheme: _darkOutlinedButtonThemeData,
switchTheme: _switchStyleDark,
checkboxTheme: _checkStyleDark,
radioTheme: _radioStyleDark,
primaryColorDark: AdwaitaColors.blueAccent,
appBarTheme: _appBarDarkTheme,
floatingActionButtonTheme: const FloatingActionButtonThemeData(
backgroundColor: AdwaitaColors.blueAccent,
),
bottomNavigationBarTheme: BottomNavigationBarThemeData(
selectedItemColor: _darkColorScheme.primary,
unselectedItemColor: AdwaitaColors.warmGrey.shade300,
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: AdwaitaColors.darkButton,
enabledBorder: const OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(8)),
borderSide: BorderSide(color: Colors.transparent),
),
focusedBorder: const OutlineInputBorder(
borderRadius: BorderRadius.all(
Radius.circular(8),
),
borderSide: BorderSide(color: AdwaitaColors.blueAccent),
),
),
bottomAppBarTheme: BottomAppBarTheme(color: _darkColorScheme.surface),
colorScheme: _darkColorScheme
.copyWith(background: _darkColorScheme.background)
.copyWith(error: _darkColorScheme.error),
);