copyWith method

  1. @override
MessageVideo copyWith({
  1. Video? video,
  2. FormattedText? caption,
  3. bool? hasSpoiler,
  4. 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
MessageVideo copyWith({
  Video? video,
  FormattedText? caption,
  bool? hasSpoiler,
  bool? isSecret,
}) =>
    MessageVideo(
      video: video ?? this.video,
      caption: caption ?? this.caption,
      hasSpoiler: hasSpoiler ?? this.hasSpoiler,
      isSecret: isSecret ?? this.isSecret,
    );