Jul 16, 2024
STL shortcut)
SimpleAppthemeMode to switch between ThemeMode.light, ThemeMode.dark, ThemeMode.systemBrightness, ColorScheme, TextTheme, etc.TAppTheme to hold theme datastatic final ThemeData lightTheme = ThemeData(
useMaterial3: true,
brightness: Brightness.light,
primaryColor: Colors.blue,
scaffoldBackgroundColor: Colors.white,
);
static final ThemeData darkTheme = ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
primaryColor: Colors.blue,
scaffoldBackgroundColor: Colors.black,
);
headlineLarge, headlineMedium with TextStylecopyWith methodTTextTheme classElevatedButtonThemeDataTextStyle, Padding, Shape etc.AppBarTheme for light and dark modeselevation, backgroundColor, iconColorBottomSheetThemeDataelevation, backgroundColor, and shapecheckColor and fillColorChipThemeDatapadding, checkmarkColor, selectedColorOutlineButtonThemeDataside, padding, shapemain.dart theme: TAppTheme.lightTheme,
darkTheme: TAppTheme.darkTheme,
themeMode: ThemeMode.system,