copyWith method
InputMessagePhoto
copyWith({
- InputPhoto? photo,
- FormattedText? caption()?,
- bool? showCaptionAboveMedia,
- MessageSelfDestructType? selfDestructType()?,
- bool? hasSpoiler,
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
InputMessagePhoto copyWith({
InputPhoto? photo,
FormattedText? Function()? caption,
bool? showCaptionAboveMedia,
MessageSelfDestructType? Function()? selfDestructType,
bool? hasSpoiler,
}) => InputMessagePhoto(
photo: photo ?? this.photo,
caption: caption != null ? caption() : this.caption,
showCaptionAboveMedia: showCaptionAboveMedia ?? this.showCaptionAboveMedia,
selfDestructType: selfDestructType != null
? selfDestructType()
: this.selfDestructType,
hasSpoiler: hasSpoiler ?? this.hasSpoiler,
);