copyWith method

ThemeSettings copyWith({
  1. int? accentColor,
  2. Background? background()?,
  3. BackgroundFill? outgoingMessageFill,
  4. bool? animateOutgoingMessageFill,
  5. int? outgoingMessageAccentColor,
})

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

Implementation

ThemeSettings copyWith({
  int? accentColor,
  Background? Function()? background,
  BackgroundFill? outgoingMessageFill,
  bool? animateOutgoingMessageFill,
  int? outgoingMessageAccentColor,
}) =>
    ThemeSettings(
      accentColor: accentColor ?? this.accentColor,
      background: background != null ? background() : this.background,
      outgoingMessageFill: outgoingMessageFill ?? this.outgoingMessageFill,
      animateOutgoingMessageFill:
          animateOutgoingMessageFill ?? this.animateOutgoingMessageFill,
      outgoingMessageAccentColor:
          outgoingMessageAccentColor ?? this.outgoingMessageAccentColor,
    );