copyWith method

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