copyWith method

SetDefaultBackground copyWith({
  1. InputBackground? background()?,
  2. BackgroundType? type()?,
  3. bool? forDarkTheme,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

SetDefaultBackground copyWith({
  InputBackground? Function()? background,
  BackgroundType? Function()? type,
  bool? forDarkTheme,
}) =>
    SetDefaultBackground(
      background: background != null ? background() : this.background,
      type: type != null ? type() : this.type,
      forDarkTheme: forDarkTheme ?? this.forDarkTheme,
    );