themeData static method
Implementation
static ThemeData themeData(ColorScheme colorScheme, Color focusColor) {
return ThemeData(
primaryColor: colorScheme.primary,
colorScheme: colorScheme,
canvasColor: colorScheme.surface,
scaffoldBackgroundColor: colorScheme.surface,
highlightColor: Colors.transparent,
focusColor: focusColor,
floatingActionButtonTheme: FloatingActionButtonThemeData(
backgroundColor: colorScheme.primary,
foregroundColor: colorScheme.onPrimary,
),
cardTheme: colorScheme.brightness == Brightness.light
? LightTheme.lightCardtheme
: DarkTheme.darkCardTheme,
typography: Typography.material2021(
white: GoogleFonts.beVietnamProTextTheme(LightTheme.lightTextTheme),
black: GoogleFonts.beVietnamProTextTheme(DarkTheme.darkTextTheme),
),
textTheme: GoogleFonts.beVietnamProTextTheme(
colorScheme.brightness == Brightness.light
? LightTheme.lightTextTheme
: DarkTheme.darkTextTheme,
),
appBarTheme: colorScheme.brightness == Brightness.light
? LightTheme.lightAppBarTheme
: DarkTheme.darkAppBarTheme,
inputDecorationTheme: colorScheme.brightness == Brightness.light
? LightTheme.lightInputDecorationTheme
: DarkTheme.darkInputDecorationTheme,
// bottomAppBarTheme: colorScheme.brightness == Brightness.light
// ? LightTheme.lightBottomAppBarTheme
// : DarkTheme.darkBottomAppBarTheme,
bottomNavigationBarTheme: colorScheme.brightness == Brightness.light
? LightTheme.lightBottomNavigationBarTheme
: DarkTheme.darkBottomNavigationBarTheme,
);
}