copyWith method

AcmeThemeData<Object> copyWith({
  1. ThemeData? lightTheme,
  2. ThemeData? darkTheme,
  3. ThemeMode? themeMode,
})

Creates a copy of this theme but with the given fields replaced with the new values.

Implementation

AcmeThemeData copyWith({
  ThemeData? lightTheme,
  ThemeData? darkTheme,
  ThemeMode? themeMode,
}) {
  return AcmeThemeData._(
    name: name,
    lightTheme: lightTheme ?? this.lightTheme,
    darkTheme: darkTheme ?? this.darkTheme,
    themeMode: themeMode ?? this.themeMode,
    components: components,
  );
}