copyWith method
Message
copyWith({
- int? id,
- MessageSender? senderId,
- int? chatId,
- MessageSendingState? sendingState,
- MessageSchedulingState? schedulingState,
- bool? isOutgoing,
- bool? isPinned,
- bool? canBeEdited,
- bool? canBeForwarded,
- bool? canBeSaved,
- bool? canBeDeletedOnlyForSelf,
- bool? canBeDeletedForAllUsers,
- bool? canGetStatistics,
- bool? canGetMessageThread,
- bool? canGetViewers,
- bool? canGetMediaTimestampLinks,
- bool? hasTimestampedMedia,
- bool? isChannelPost,
- bool? containsUnreadMention,
- int? date,
- int? editDate,
- MessageForwardInfo? forwardInfo,
- MessageInteractionInfo? interactionInfo,
- int? replyInChatId,
- int? replyToMessageId,
- int? messageThreadId,
- int? ttl,
- double? ttlExpiresIn,
- int? viaBotUserId,
- String? authorSignature,
- int? mediaAlbumId,
- String? restrictionReason,
- MessageContent? content,
- ReplyMarkup? replyMarkup,
- dynamic extra,
- int? clientId,
Implementation
Message copyWith({
int? id,
MessageSender? senderId,
int? chatId,
MessageSendingState? sendingState,
MessageSchedulingState? schedulingState,
bool? isOutgoing,
bool? isPinned,
bool? canBeEdited,
bool? canBeForwarded,
bool? canBeSaved,
bool? canBeDeletedOnlyForSelf,
bool? canBeDeletedForAllUsers,
bool? canGetStatistics,
bool? canGetMessageThread,
bool? canGetViewers,
bool? canGetMediaTimestampLinks,
bool? hasTimestampedMedia,
bool? isChannelPost,
bool? containsUnreadMention,
int? date,
int? editDate,
MessageForwardInfo? forwardInfo,
MessageInteractionInfo? interactionInfo,
int? replyInChatId,
int? replyToMessageId,
int? messageThreadId,
int? ttl,
double? ttlExpiresIn,
int? viaBotUserId,
String? authorSignature,
int? mediaAlbumId,
String? restrictionReason,
MessageContent? content,
ReplyMarkup? replyMarkup,
dynamic extra,
int? clientId,
}) => Message(
id: id ?? this.id,
senderId: senderId ?? this.senderId,
chatId: chatId ?? this.chatId,
sendingState: sendingState ?? this.sendingState,
schedulingState: schedulingState ?? this.schedulingState,
isOutgoing: isOutgoing ?? this.isOutgoing,
isPinned: isPinned ?? this.isPinned,
canBeEdited: canBeEdited ?? this.canBeEdited,
canBeForwarded: canBeForwarded ?? this.canBeForwarded,
canBeSaved: canBeSaved ?? this.canBeSaved,
canBeDeletedOnlyForSelf: canBeDeletedOnlyForSelf ?? this.canBeDeletedOnlyForSelf,
canBeDeletedForAllUsers: canBeDeletedForAllUsers ?? this.canBeDeletedForAllUsers,
canGetStatistics: canGetStatistics ?? this.canGetStatistics,
canGetMessageThread: canGetMessageThread ?? this.canGetMessageThread,
canGetViewers: canGetViewers ?? this.canGetViewers,
canGetMediaTimestampLinks: canGetMediaTimestampLinks ?? this.canGetMediaTimestampLinks,
hasTimestampedMedia: hasTimestampedMedia ?? this.hasTimestampedMedia,
isChannelPost: isChannelPost ?? this.isChannelPost,
containsUnreadMention: containsUnreadMention ?? this.containsUnreadMention,
date: date ?? this.date,
editDate: editDate ?? this.editDate,
forwardInfo: forwardInfo ?? this.forwardInfo,
interactionInfo: interactionInfo ?? this.interactionInfo,
replyInChatId: replyInChatId ?? this.replyInChatId,
replyToMessageId: replyToMessageId ?? this.replyToMessageId,
messageThreadId: messageThreadId ?? this.messageThreadId,
ttl: ttl ?? this.ttl,
ttlExpiresIn: ttlExpiresIn ?? this.ttlExpiresIn,
viaBotUserId: viaBotUserId ?? this.viaBotUserId,
authorSignature: authorSignature ?? this.authorSignature,
mediaAlbumId: mediaAlbumId ?? this.mediaAlbumId,
restrictionReason: restrictionReason ?? this.restrictionReason,
content: content ?? this.content,
replyMarkup: replyMarkup ?? this.replyMarkup,
extra: extra ?? this.extra,
clientId: clientId ?? this.clientId,
);