copyWith method
SendEphemeralMessage
copyWith({
- int? chatId,
- MessageTopic? topicId()?,
- int? receiverUserId,
- int? callbackQueryId,
- bool? replaceCallbackQueryMessage,
- InputMessageReplyTo? replyTo()?,
- bool? protectContent,
- int? sendingId,
- bool? onlyPreview,
- ReplyMarkup? replyMarkup()?,
- InputMessageContent? inputMessageContent,
Returns a copy with the given fields replaced. For a nullable
field pass a function, e.g. field: () => null to clear it.
Implementation
SendEphemeralMessage copyWith({
int? chatId,
MessageTopic? Function()? topicId,
int? receiverUserId,
int? callbackQueryId,
bool? replaceCallbackQueryMessage,
InputMessageReplyTo? Function()? replyTo,
bool? protectContent,
int? sendingId,
bool? onlyPreview,
ReplyMarkup? Function()? replyMarkup,
InputMessageContent? inputMessageContent,
}) => SendEphemeralMessage(
chatId: chatId ?? this.chatId,
topicId: topicId != null ? topicId() : this.topicId,
receiverUserId: receiverUserId ?? this.receiverUserId,
callbackQueryId: callbackQueryId ?? this.callbackQueryId,
replaceCallbackQueryMessage:
replaceCallbackQueryMessage ?? this.replaceCallbackQueryMessage,
replyTo: replyTo != null ? replyTo() : this.replyTo,
protectContent: protectContent ?? this.protectContent,
sendingId: sendingId ?? this.sendingId,
onlyPreview: onlyPreview ?? this.onlyPreview,
replyMarkup: replyMarkup != null ? replyMarkup() : this.replyMarkup,
inputMessageContent: inputMessageContent ?? this.inputMessageContent,
);