VideoPlayerValue constructor

const VideoPlayerValue({
  1. required Duration duration,
  2. Size size = Size.zero,
  3. Duration position = Duration.zero,
  4. List<DurationRange> buffered = const <DurationRange>[],
  5. bool isInitialized = false,
  6. bool isPlaying = false,
  7. bool isLooping = false,
  8. bool isBuffering = false,
  9. double volume = 1.0,
  10. double playbackSpeed = 1.0,
  11. String? errorDescription,
  12. 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.buffered = const <DurationRange>[],
  this.isInitialized = false,
  this.isPlaying = false,
  this.isLooping = false,
  this.isBuffering = false,
  this.volume = 1.0,
  this.playbackSpeed = 1.0,
  this.errorDescription,
  this.isCompleted = false,
});