copyWith method
Chat
copyWith({
- int? id,
- ChatType? type,
- String? title,
- ChatPhotoInfo? photo,
- ChatPermissions? permissions,
- Message? lastMessage,
- List<
ChatPosition> ? positions, - MessageSender? messageSenderId,
- bool? hasProtectedContent,
- bool? isTranslatable,
- bool? isMarkedAsUnread,
- bool? isBlocked,
- bool? hasScheduledMessages,
- bool? canBeDeletedOnlyForSelf,
- bool? canBeDeletedForAllUsers,
- bool? canBeReported,
- bool? defaultDisableNotification,
- int? unreadCount,
- int? lastReadInboxMessageId,
- int? lastReadOutboxMessageId,
- int? unreadMentionCount,
- int? unreadReactionCount,
- ChatNotificationSettings? notificationSettings,
- ChatAvailableReactions? availableReactions,
- int? messageAutoDeleteTime,
- ChatBackground? background,
- 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? isTranslatable,
bool? isMarkedAsUnread,
bool? isBlocked,
bool? hasScheduledMessages,
bool? canBeDeletedOnlyForSelf,
bool? canBeDeletedForAllUsers,
bool? canBeReported,
bool? defaultDisableNotification,
int? unreadCount,
int? lastReadInboxMessageId,
int? lastReadOutboxMessageId,
int? unreadMentionCount,
int? unreadReactionCount,
ChatNotificationSettings? notificationSettings,
ChatAvailableReactions? availableReactions,
int? messageAutoDeleteTime,
ChatBackground? background,
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,
isTranslatable: isTranslatable ?? this.isTranslatable,
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,
unreadReactionCount: unreadReactionCount ?? this.unreadReactionCount,
notificationSettings: notificationSettings ?? this.notificationSettings,
availableReactions: availableReactions ?? this.availableReactions,
messageAutoDeleteTime:
messageAutoDeleteTime ?? this.messageAutoDeleteTime,
background: background ?? this.background,
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,
);