copyWith method

QuickReplyMessage copyWith({
  1. int? id,
  2. MessageSendingState? sendingState()?,
  3. bool? canBeEdited,
  4. int? replyToMessageId,
  5. int? viaBotUserId,
  6. int? mediaAlbumId,
  7. MessageContent? content,
  8. ReplyMarkup? replyMarkup()?,
})

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

Implementation

QuickReplyMessage copyWith({
  int? id,
  MessageSendingState? Function()? sendingState,
  bool? canBeEdited,
  int? replyToMessageId,
  int? viaBotUserId,
  int? mediaAlbumId,
  MessageContent? content,
  ReplyMarkup? Function()? replyMarkup,
}) =>
    QuickReplyMessage(
      id: id ?? this.id,
      sendingState: sendingState != null ? sendingState() : this.sendingState,
      canBeEdited: canBeEdited ?? this.canBeEdited,
      replyToMessageId: replyToMessageId ?? this.replyToMessageId,
      viaBotUserId: viaBotUserId ?? this.viaBotUserId,
      mediaAlbumId: mediaAlbumId ?? this.mediaAlbumId,
      content: content ?? this.content,
      replyMarkup: replyMarkup != null ? replyMarkup() : this.replyMarkup,
    );