VideoPlayerValue constructor

const VideoPlayerValue({
  1. required Duration duration,
  2. Size size = Size.zero,
  3. Duration position = Duration.zero,
  4. Caption caption = Caption.none,
  5. Duration captionOffset = Duration.zero,
  6. List<DurationRange> buffered = const <DurationRange>[],
  7. bool isInitialized = false,
  8. bool isPlaying = false,
  9. bool isLooping = false,
  10. bool isBuffering = false,
  11. double volume = 1.0,
  12. double playbackSpeed = 1.0,
  13. int rotationCorrection = 0,
  14. String? errorDescription,
  15. bool isCompleted = false,
})

Constructs a video with the given values. Only duration is required. The rest will initialize with default values when unset.

Implementation

const VideoPlayerValue({
  required this.duration,
  this.size = Size.zero,
  this.position = Duration.zero,
  this.caption = Caption.none,
  this.captionOffset = Duration.zero,
  this.buffered = const <DurationRange>[],
  this.isInitialized = false,
  this.isPlaying = false,
  this.isLooping = false,
  this.isBuffering = false,
  this.volume = 1.0,
  this.playbackSpeed = 1.0,
  this.rotationCorrection = 0,
  this.errorDescription,
  this.isCompleted = false,
});