copyWith method

Chat copyWith({
  1. int? id,
  2. ChatType? type,
  3. String? title,
  4. ChatPhotoInfo? photo,
  5. ChatPermissions? permissions,
  6. Message? lastMessage,
  7. List<ChatPosition>? positions,
  8. MessageSender? messageSenderId,
  9. bool? hasProtectedContent,
  10. bool? isMarkedAsUnread,
  11. bool? isBlocked,
  12. bool? hasScheduledMessages,
  13. bool? canBeDeletedOnlyForSelf,
  14. bool? canBeDeletedForAllUsers,
  15. bool? canBeReported,
  16. bool? defaultDisableNotification,
  17. int? unreadCount,
  18. int? lastReadInboxMessageId,
  19. int? lastReadOutboxMessageId,
  20. int? unreadMentionCount,
  21. ChatNotificationSettings? notificationSettings,
  22. int? messageTtl,
  23. String? themeName,
  24. ChatActionBar? actionBar,
  25. VideoChat? videoChat,
  26. ChatJoinRequestsInfo? pendingJoinRequests,
  27. int? replyMarkupMessageId,
  28. DraftMessage? draftMessage,
  29. String? clientData,
  30. dynamic extra,
  31. int? clientId,
})

Implementation

Chat copyWith({
  int? id,
  ChatType? type,
  String? title,
  ChatPhotoInfo? photo,
  ChatPermissions? permissions,
  Message? lastMessage,
  List<ChatPosition>? positions,
  MessageSender? messageSenderId,
  bool? hasProtectedContent,
  bool? isMarkedAsUnread,
  bool? isBlocked,
  bool? hasScheduledMessages,
  bool? canBeDeletedOnlyForSelf,
  bool? canBeDeletedForAllUsers,
  bool? canBeReported,
  bool? defaultDisableNotification,
  int? unreadCount,
  int? lastReadInboxMessageId,
  int? lastReadOutboxMessageId,
  int? unreadMentionCount,
  ChatNotificationSettings? notificationSettings,
  int? messageTtl,
  String? themeName,
  ChatActionBar? actionBar,
  VideoChat? videoChat,
  ChatJoinRequestsInfo? pendingJoinRequests,
  int? replyMarkupMessageId,
  DraftMessage? draftMessage,
  String? clientData,
  dynamic extra,
  int? clientId,
}) => Chat(
  id: id ?? this.id,
  type: type ?? this.type,
  title: title ?? this.title,
  photo: photo ?? this.photo,
  permissions: permissions ?? this.permissions,
  lastMessage: lastMessage ?? this.lastMessage,
  positions: positions ?? this.positions,
  messageSenderId: messageSenderId ?? this.messageSenderId,
  hasProtectedContent: hasProtectedContent ?? this.hasProtectedContent,
  isMarkedAsUnread: isMarkedAsUnread ?? this.isMarkedAsUnread,
  isBlocked: isBlocked ?? this.isBlocked,
  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,
  notificationSettings: notificationSettings ?? this.notificationSettings,
  messageTtl: messageTtl ?? this.messageTtl,
  themeName: themeName ?? this.themeName,
  actionBar: actionBar ?? this.actionBar,
  videoChat: videoChat ?? this.videoChat,
  pendingJoinRequests: pendingJoinRequests ?? this.pendingJoinRequests,
  replyMarkupMessageId: replyMarkupMessageId ?? this.replyMarkupMessageId,
  draftMessage: draftMessage ?? this.draftMessage,
  clientData: clientData ?? this.clientData,
  extra: extra ?? this.extra,
  clientId: clientId ?? this.clientId,
);