copyWith method
EphemeralMessageContent
copyWith({
- bool? canBeSaved,
- bool? hasTimestampedMedia,
- MessageContent? content,
- 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,
);