copyWith method

SendInlineQueryResultMessage copyWith({
  1. int? chatId,
  2. int? messageThreadId,
  3. InputMessageReplyTo? replyTo()?,
  4. MessageSendOptions? options()?,
  5. int? queryId,
  6. String? resultId,
  7. bool? hideViaBot,
})

Returns a copy with the given fields replaced. For a nullable field pass a function, e.g. field: () => null to clear it.

Implementation

SendInlineQueryResultMessage copyWith({
  int? chatId,
  int? messageThreadId,
  InputMessageReplyTo? Function()? replyTo,
  MessageSendOptions? Function()? options,
  int? queryId,
  String? resultId,
  bool? hideViaBot,
}) =>
    SendInlineQueryResultMessage(
      chatId: chatId ?? this.chatId,
      messageThreadId: messageThreadId ?? this.messageThreadId,
      replyTo: replyTo != null ? replyTo() : this.replyTo,
      options: options != null ? options() : this.options,
      queryId: queryId ?? this.queryId,
      resultId: resultId ?? this.resultId,
      hideViaBot: hideViaBot ?? this.hideViaBot,
    );