copyWith method

  1. @override
InputMessageVideo copyWith({
  1. InputVideo? video,
  2. FormattedText? caption()?,
  3. bool? showCaptionAboveMedia,
  4. MessageSelfDestructType? selfDestructType()?,
  5. 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
InputMessageVideo copyWith({
  InputVideo? video,
  FormattedText? Function()? caption,
  bool? showCaptionAboveMedia,
  MessageSelfDestructType? Function()? selfDestructType,
  bool? hasSpoiler,
}) => InputMessageVideo(
  video: video ?? this.video,
  caption: caption != null ? caption() : this.caption,
  showCaptionAboveMedia: showCaptionAboveMedia ?? this.showCaptionAboveMedia,
  selfDestructType: selfDestructType != null
      ? selfDestructType()
      : this.selfDestructType,
  hasSpoiler: hasSpoiler ?? this.hasSpoiler,
);