copyWith method

EphemeralMessageContent copyWith({
  1. bool? canBeSaved,
  2. bool? hasTimestampedMedia,
  3. MessageContent? content,
  4. 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

EphemeralMessageContent copyWith({
  bool? canBeSaved,
  bool? hasTimestampedMedia,
  MessageContent? content,
  ReplyMarkup? Function()? replyMarkup,
}) => EphemeralMessageContent(
  canBeSaved: canBeSaved ?? this.canBeSaved,
  hasTimestampedMedia: hasTimestampedMedia ?? this.hasTimestampedMedia,
  content: content ?? this.content,
  replyMarkup: replyMarkup != null ? replyMarkup() : this.replyMarkup,
);