copyWith method

Chat copyWith({
  1. int? id,
  2. ChatType? type,
  3. String? title,
  4. ChatPhotoInfo? photo,
  5. int? accentColorId,
  6. int? backgroundCustomEmojiId,
  7. UpgradedGiftColors? upgradedGiftColors,
  8. int? profileAccentColorId,
  9. int? profileBackgroundCustomEmojiId,
  10. ChatPermissions? permissions,
  11. Message? lastMessage,
  12. List<ChatPosition>? positions,
  13. List<ChatList>? chatLists,
  14. MessageSender? messageSenderId,
  15. BlockList? blockList,
  16. bool? hasProtectedContent,
  17. bool? isTranslatable,
  18. bool? isMarkedAsUnread,
  19. bool? viewAsTopics,
  20. bool? hasScheduledMessages,
  21. bool? canBeDeletedOnlyForSelf,
  22. bool? canBeDeletedForAllUsers,
  23. bool? canBeReported,
  24. bool? defaultDisableNotification,
  25. int? unreadCount,
  26. int? lastReadInboxMessageId,
  27. int? lastReadOutboxMessageId,
  28. int? unreadMentionCount,
  29. int? unreadReactionCount,
  30. int? unreadPollVoteCount,
  31. ChatNotificationSettings? notificationSettings,
  32. ChatAvailableReactions? availableReactions,
  33. int? messageAutoDeleteTime,
  34. EmojiStatus? emojiStatus,
  35. ChatBackground? background,
  36. ChatTheme? theme,
  37. ChatActionBar? actionBar,
  38. BusinessBotManageBar? businessBotManageBar,
  39. VideoChat? videoChat,
  40. ChatJoinRequestsInfo? pendingJoinRequests,
  41. int? replyMarkupMessageId,
  42. DraftMessage? draftMessage,
  43. String? clientData,
})

Implementation

Chat copyWith({
  int? id,
  ChatType? type,
  String? title,
  ChatPhotoInfo? photo,
  int? accentColorId,
  int? backgroundCustomEmojiId,
  UpgradedGiftColors? upgradedGiftColors,
  int? profileAccentColorId,
  int? profileBackgroundCustomEmojiId,
  ChatPermissions? permissions,
  Message? lastMessage,
  List<ChatPosition>? positions,
  List<ChatList>? chatLists,
  MessageSender? messageSenderId,
  BlockList? blockList,
  bool? hasProtectedContent,
  bool? isTranslatable,
  bool? isMarkedAsUnread,
  bool? viewAsTopics,
  bool? hasScheduledMessages,
  bool? canBeDeletedOnlyForSelf,
  bool? canBeDeletedForAllUsers,
  bool? canBeReported,
  bool? defaultDisableNotification,
  int? unreadCount,
  int? lastReadInboxMessageId,
  int? lastReadOutboxMessageId,
  int? unreadMentionCount,
  int? unreadReactionCount,
  int? unreadPollVoteCount,
  ChatNotificationSettings? notificationSettings,
  ChatAvailableReactions? availableReactions,
  int? messageAutoDeleteTime,
  EmojiStatus? emojiStatus,
  ChatBackground? background,
  ChatTheme? theme,
  ChatActionBar? actionBar,
  BusinessBotManageBar? businessBotManageBar,
  VideoChat? videoChat,
  ChatJoinRequestsInfo? pendingJoinRequests,
  int? replyMarkupMessageId,
  DraftMessage? draftMessage,
  String? clientData,
}) => Chat(
  id: id ?? this.id,
  type: type ?? this.type,
  title: title ?? this.title,
  photo: photo ?? this.photo,
  accentColorId: accentColorId ?? this.accentColorId,
  backgroundCustomEmojiId:
      backgroundCustomEmojiId ?? this.backgroundCustomEmojiId,
  upgradedGiftColors: upgradedGiftColors ?? this.upgradedGiftColors,
  profileAccentColorId: profileAccentColorId ?? this.profileAccentColorId,
  profileBackgroundCustomEmojiId:
      profileBackgroundCustomEmojiId ?? this.profileBackgroundCustomEmojiId,
  permissions: permissions ?? this.permissions,
  lastMessage: lastMessage ?? this.lastMessage,
  positions: positions ?? this.positions,
  chatLists: chatLists ?? this.chatLists,
  messageSenderId: messageSenderId ?? this.messageSenderId,
  blockList: blockList ?? this.blockList,
  hasProtectedContent: hasProtectedContent ?? this.hasProtectedContent,
  isTranslatable: isTranslatable ?? this.isTranslatable,
  isMarkedAsUnread: isMarkedAsUnread ?? this.isMarkedAsUnread,
  viewAsTopics: viewAsTopics ?? this.viewAsTopics,
  hasScheduledMessages: hasScheduledMessages ?? this.hasScheduledMessages,
  canBeDeletedOnlyForSelf:
      canBeDeletedOnlyForSelf ?? this.canBeDeletedOnlyForSelf,
  canBeDeletedForAllUsers:
      canBeDeletedForAllUsers ?? this.canBeDeletedForAllUsers,
  canBeReported: canBeReported ?? this.canBeReported,
  defaultDisableNotification:
      defaultDisableNotification ?? this.defaultDisableNotification,
  unreadCount: unreadCount ?? this.unreadCount,
  lastReadInboxMessageId:
      lastReadInboxMessageId ?? this.lastReadInboxMessageId,
  lastReadOutboxMessageId:
      lastReadOutboxMessageId ?? this.lastReadOutboxMessageId,
  unreadMentionCount: unreadMentionCount ?? this.unreadMentionCount,
  unreadReactionCount: unreadReactionCount ?? this.unreadReactionCount,
  unreadPollVoteCount: unreadPollVoteCount ?? this.unreadPollVoteCount,
  notificationSettings: notificationSettings ?? this.notificationSettings,
  availableReactions: availableReactions ?? this.availableReactions,
  messageAutoDeleteTime: messageAutoDeleteTime ?? this.messageAutoDeleteTime,
  emojiStatus: emojiStatus ?? this.emojiStatus,
  background: background ?? this.background,
  theme: theme ?? this.theme,
  actionBar: actionBar ?? this.actionBar,
  businessBotManageBar: businessBotManageBar ?? this.businessBotManageBar,
  videoChat: videoChat ?? this.videoChat,
  pendingJoinRequests: pendingJoinRequests ?? this.pendingJoinRequests,
  replyMarkupMessageId: replyMarkupMessageId ?? this.replyMarkupMessageId,
  draftMessage: draftMessage ?? this.draftMessage,
  clientData: clientData ?? this.clientData,
);