copyWith method

OpenWebApp copyWith({
  1. int? chatId,
  2. int? botUserId,
  3. String? url,
  4. ThemeParameters? theme()?,
  5. String? applicationName,
  6. int? messageThreadId,
  7. InputMessageReplyTo? replyTo()?,
})

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,
  ThemeParameters? Function()? theme,
  String? applicationName,
  int? messageThreadId,
  InputMessageReplyTo? Function()? replyTo,
}) =>
    OpenWebApp(
      chatId: chatId ?? this.chatId,
      botUserId: botUserId ?? this.botUserId,
      url: url ?? this.url,
      theme: theme != null ? theme() : this.theme,
      applicationName: applicationName ?? this.applicationName,
      messageThreadId: messageThreadId ?? this.messageThreadId,
      replyTo: replyTo != null ? replyTo() : this.replyTo,
    );