VideoPlayerValue constructor

VideoPlayerValue({
  1. required Duration? duration,
  2. Size? size,
  3. Duration position = const Duration(),
  4. DateTime? absolutePosition,
  5. List<DurationRange> buffered = const <DurationRange>[],
  6. List<BetterPlayerTrack>? tracks,
  7. bool isPlaying = false,
  8. bool isLooping = false,
  9. bool isBuffering = false,
  10. double volume = 1.0,
  11. double speed = 1.0,
  12. String? errorDescription,
  13. bool isPip = false,
})

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

Implementation

VideoPlayerValue({
  required this.duration,
  this.size,
  this.position = const Duration(),
  this.absolutePosition,
  this.buffered = const <DurationRange>[],
  this.tracks,
  this.isPlaying = false,
  this.isLooping = false,
  this.isBuffering = false,
  this.volume = 1.0,
  this.speed = 1.0,
  this.errorDescription,
  this.isPip = false,
});