copyWith method

OpenWebApp copyWith({
  1. int? chatId,
  2. int? botUserId,
  3. String? url,
  4. MessageTopic? topicId()?,
  5. InputMessageReplyTo? replyTo()?,
  6. WebAppOpenParameters? parameters,
})

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

Implementation

OpenWebApp copyWith({
  int? chatId,
  int? botUserId,
  String? url,
  MessageTopic? Function()? topicId,
  InputMessageReplyTo? Function()? replyTo,
  WebAppOpenParameters? parameters,
}) => OpenWebApp(
  chatId: chatId ?? this.chatId,
  botUserId: botUserId ?? this.botUserId,
  url: url ?? this.url,
  topicId: topicId != null ? topicId() : this.topicId,
  replyTo: replyTo != null ? replyTo() : this.replyTo,
  parameters: parameters ?? this.parameters,
);