ThemeProvider constructor Null safety

ThemeProvider(
  1. {required ThemeData darkTheme,
  2. required ThemeData lightTheme,
  3. bool? dark,
  4. ThemeMode themeMode = ThemeMode.dark}
)

Implementation

ThemeProvider({
  required this.darkTheme,
  required this.lightTheme,
  bool? dark,
  ThemeMode themeMode = ThemeMode.dark,
}) {
  _themeMode = themeMode;
  // switchTheme(dark ?? _isDarkMode);
}