copyWith method

  1. @override
MessageReplyToMessage copyWith({
  1. int? chatId,
  2. int? messageId,
  3. TextQuote? quote()?,
  4. MessageOrigin? origin()?,
  5. int? originSendDate,
  6. MessageContent? content()?,
})
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
MessageReplyToMessage copyWith({
  int? chatId,
  int? messageId,
  TextQuote? Function()? quote,
  MessageOrigin? Function()? origin,
  int? originSendDate,
  MessageContent? Function()? content,
}) =>
    MessageReplyToMessage(
      chatId: chatId ?? this.chatId,
      messageId: messageId ?? this.messageId,
      quote: quote != null ? quote() : this.quote,
      origin: origin != null ? origin() : this.origin,
      originSendDate: originSendDate ?? this.originSendDate,
      content: content != null ? content() : this.content,
    );