copyWith method

SetChatBackground copyWith({
  1. int? chatId,
  2. InputBackground? background()?,
  3. BackgroundType? type()?,
  4. int? darkThemeDimming,
  5. bool? onlyForSelf,
})

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

Implementation

SetChatBackground copyWith({
  int? chatId,
  InputBackground? Function()? background,
  BackgroundType? Function()? type,
  int? darkThemeDimming,
  bool? onlyForSelf,
}) =>
    SetChatBackground(
      chatId: chatId ?? this.chatId,
      background: background != null ? background() : this.background,
      type: type != null ? type() : this.type,
      darkThemeDimming: darkThemeDimming ?? this.darkThemeDimming,
      onlyForSelf: onlyForSelf ?? this.onlyForSelf,
    );