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? canGetAddedReactions,
- bool? canGetStatistics,
- bool? canGetMessageThread,
- bool? canGetViewers,
- bool? canGetMediaTimestampLinks,
- bool? canReportReactions,
- bool? hasTimestampedMedia,
- bool? isChannelPost,
- bool? isTopicMessage,
- bool? containsUnreadMention,
- int? date,
- int? editDate,
- MessageForwardInfo? forwardInfo,
- MessageInteractionInfo? interactionInfo,
- List<
UnreadReaction> ? unreadReactions, - MessageReplyTo? replyTo,
- int? messageThreadId,
- int? selfDestructTime,
- double? selfDestructIn,
- double? autoDeleteIn,
- 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? canGetAddedReactions,
bool? canGetStatistics,
bool? canGetMessageThread,
bool? canGetViewers,
bool? canGetMediaTimestampLinks,
bool? canReportReactions,
bool? hasTimestampedMedia,
bool? isChannelPost,
bool? isTopicMessage,
bool? containsUnreadMention,
int? date,
int? editDate,
MessageForwardInfo? forwardInfo,
MessageInteractionInfo? interactionInfo,
List<UnreadReaction>? unreadReactions,
MessageReplyTo? replyTo,
int? messageThreadId,
int? selfDestructTime,
double? selfDestructIn,
double? autoDeleteIn,
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,
canGetAddedReactions: canGetAddedReactions ?? this.canGetAddedReactions,
canGetStatistics: canGetStatistics ?? this.canGetStatistics,
canGetMessageThread: canGetMessageThread ?? this.canGetMessageThread,
canGetViewers: canGetViewers ?? this.canGetViewers,
canGetMediaTimestampLinks:
canGetMediaTimestampLinks ?? this.canGetMediaTimestampLinks,
canReportReactions: canReportReactions ?? this.canReportReactions,
hasTimestampedMedia: hasTimestampedMedia ?? this.hasTimestampedMedia,
isChannelPost: isChannelPost ?? this.isChannelPost,
isTopicMessage: isTopicMessage ?? this.isTopicMessage,
containsUnreadMention:
containsUnreadMention ?? this.containsUnreadMention,
date: date ?? this.date,
editDate: editDate ?? this.editDate,
forwardInfo: forwardInfo ?? this.forwardInfo,
interactionInfo: interactionInfo ?? this.interactionInfo,
unreadReactions: unreadReactions ?? this.unreadReactions,
replyTo: replyTo ?? this.replyTo,
messageThreadId: messageThreadId ?? this.messageThreadId,
selfDestructTime: selfDestructTime ?? this.selfDestructTime,
selfDestructIn: selfDestructIn ?? this.selfDestructIn,
autoDeleteIn: autoDeleteIn ?? this.autoDeleteIn,
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,
);