copyWith method

MessagePhoto copyWith({
  1. Photo? photo,
  2. Video? video,
  3. FormattedText? caption,
  4. bool? showCaptionAboveMedia,
  5. bool? hasSpoiler,
  6. bool? isSecret,
})

Implementation

MessagePhoto copyWith({
  Photo? photo,
  Video? video,
  FormattedText? caption,
  bool? showCaptionAboveMedia,
  bool? hasSpoiler,
  bool? isSecret,
}) => MessagePhoto(
  photo: photo ?? this.photo,
  video: video ?? this.video,
  caption: caption ?? this.caption,
  showCaptionAboveMedia: showCaptionAboveMedia ?? this.showCaptionAboveMedia,
  hasSpoiler: hasSpoiler ?? this.hasSpoiler,
  isSecret: isSecret ?? this.isSecret,
);