PlayVideoController constructor

PlayVideoController({
  1. required Videos videos,
  2. int startIndex = 0,
  3. bool isAutoPlay = true,
  4. Duration startingDuration = Duration.zero,
  5. BoxFit fit = BoxFit.contain,
  6. bool wakeLock = true,
  7. double? aspectRatio,
})

PlayVideoController is the controller passed in the VideoPlayer widget It Contain common functionality and my differs according to the input

To access the state that contain all funtionality It must be given as a controller in the PlayVideo

Implementation

PlayVideoController({
  required this.videos,
  this.startIndex = 0,
  this.isAutoPlay = true,
  this.startingDuration = Duration.zero,
  this.fit = BoxFit.contain,
  this.wakeLock = true,
  this.aspectRatio,
}) {
  try {
    MediaKit.ensureInitialized();
  } catch (_) {}
}