copyWith method

ThemeState copyWith({
  1. bool? isDark,
  2. ThemeMode? themeMode,
})

Creates a new ThemeState with the given values. If a value is not provided, the corresponding value from this ThemeState is used instead.

Implementation

//
/// If a value is not provided, the corresponding value from this [ThemeState]
/// is used instead.
ThemeState copyWith({final bool? isDark, final ThemeMode? themeMode}) =>
    ThemeState(
      isDark: isDark ?? this.isDark,
      themeMode: themeMode ?? this.themeMode,
    );