copyWith method

MediaOverrideState copyWith({
  1. ThemeMode? themeMode,
  2. bool clearThemeMode = false,
  3. Locale? locale,
  4. bool clearLocale = false,
})

Implementation

MediaOverrideState copyWith({
  ThemeMode? themeMode,
  bool clearThemeMode = false,
  Locale? locale,
  bool clearLocale = false,
}) {
  assert(!(clearThemeMode && themeMode != null));
  assert(!(clearLocale && locale != null));

  return MediaOverrideState(
    themeMode: clearThemeMode ? null : themeMode ?? this.themeMode,
    locale: clearLocale ? null : locale ?? this.locale,
  );
}