copyWith method

  1. @override
InputMessageForwarded copyWith({
  1. int? fromChatId,
  2. int? messageId,
  3. bool? inGameShare,
  4. MessageCopyOptions? copyOptions()?,
})
override

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

Implementation

@override
InputMessageForwarded copyWith({
  int? fromChatId,
  int? messageId,
  bool? inGameShare,
  MessageCopyOptions? Function()? copyOptions,
}) =>
    InputMessageForwarded(
      fromChatId: fromChatId ?? this.fromChatId,
      messageId: messageId ?? this.messageId,
      inGameShare: inGameShare ?? this.inGameShare,
      copyOptions: copyOptions != null ? copyOptions() : this.copyOptions,
    );