copyWith method
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,
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,
);