copyWith method
MessagePhoto
copyWith({
- Photo? photo,
- FormattedText? caption,
- bool? showCaptionAboveMedia,
- bool? hasSpoiler,
- bool? isSecret,
override
Copy model with modified properties.
Properties:
photo: The photocaption: Photo captionshow_caption_above_media: True, if the caption must be shown above the photo; otherwise, the caption must be shown below the photohas_spoiler: True, if the photo preview must be covered by a spoiler animationis_secret: True, if the photo must be blurred and must be shown only while tapped
Implementation
@override
MessagePhoto copyWith({
Photo? photo,
FormattedText? caption,
bool? showCaptionAboveMedia,
bool? hasSpoiler,
bool? isSecret,
}) =>
MessagePhoto(
photo: photo ?? this.photo,
caption: caption ?? this.caption,
showCaptionAboveMedia:
showCaptionAboveMedia ?? this.showCaptionAboveMedia,
hasSpoiler: hasSpoiler ?? this.hasSpoiler,
isSecret: isSecret ?? this.isSecret,
);