copyWith method
MessagePhoto
copyWith({
- Photo? photo,
- Video? video()?,
- FormattedText? caption,
- bool? showCaptionAboveMedia,
- bool? hasSpoiler,
- bool? isSecret,
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
MessagePhoto copyWith({
Photo? photo,
Video? Function()? video,
FormattedText? caption,
bool? showCaptionAboveMedia,
bool? hasSpoiler,
bool? isSecret,
}) => MessagePhoto(
photo: photo ?? this.photo,
video: video != null ? video() : this.video,
caption: caption ?? this.caption,
showCaptionAboveMedia: showCaptionAboveMedia ?? this.showCaptionAboveMedia,
hasSpoiler: hasSpoiler ?? this.hasSpoiler,
isSecret: isSecret ?? this.isSecret,
);