VideoPlayerValue constructor

VideoPlayerValue({
  1. required DurationRange duration,
  2. Size size = Size.zero,
  3. Duration position = Duration.zero,
  4. Caption caption = Caption.none,
  5. Duration captionOffset = Duration.zero,
  6. List<Track> tracks = const <Track>[],
  7. int buffered = 0,
  8. bool isInitialized = false,
  9. bool isPlaying = false,
  10. bool isLooping = false,
  11. bool isBuffering = false,
  12. double volume = 1.0,
  13. double playbackSpeed = 1.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

VideoPlayerValue({
  required this.duration,
  this.size = Size.zero,
  this.position = Duration.zero,
  this.caption = Caption.none,
  this.captionOffset = Duration.zero,
  this.tracks = const <Track>[],
  this.buffered = 0,
  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,
});