copyWith method

SendEphemeralMessage copyWith({
  1. int? chatId,
  2. MessageTopic? topicId()?,
  3. int? receiverUserId,
  4. int? callbackQueryId,
  5. bool? replaceCallbackQueryMessage,
  6. InputMessageReplyTo? replyTo()?,
  7. bool? protectContent,
  8. int? sendingId,
  9. bool? onlyPreview,
  10. ReplyMarkup? replyMarkup()?,
  11. 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,
);