copyWith method

  1. @override
PageBlockVideo copyWith({
  1. Video? video()?,
  2. PageBlockCaption? caption()?,
  3. bool? needAutoplay,
  4. bool? isLooped,
  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
PageBlockVideo copyWith({
  Video? Function()? video,
  PageBlockCaption? Function()? caption,
  bool? needAutoplay,
  bool? isLooped,
  bool? hasSpoiler,
}) => PageBlockVideo(
  video: video != null ? video() : this.video,
  caption: caption != null ? caption() : this.caption,
  needAutoplay: needAutoplay ?? this.needAutoplay,
  isLooped: isLooped ?? this.isLooped,
  hasSpoiler: hasSpoiler ?? this.hasSpoiler,
);