ChewieController constructor

ChewieController({
  1. required VideoPlayerController videoPlayerController,
  2. double? aspectRatio,
  3. bool autoInitialize = false,
  4. bool autoPlay = false,
  5. Duration? startAt,
  6. bool looping = false,
  7. bool fullScreenByDefault = false,
  8. ChewieProgressColors? cupertinoProgressColors,
  9. ChewieProgressColors? materialProgressColors,
  10. Widget? placeholder,
  11. Widget? overlay,
  12. bool showControlsOnInitialize = true,
  13. bool showControls = true,
  14. Widget? customControls,
  15. Widget errorBuilder(
    1. BuildContext context,
    2. String? errorMessage
    )?,
  16. bool allowedScreenSleep = true,
  17. bool isLive = false,
  18. bool allowFullScreen = true,
  19. bool allowMuting = true,
  20. bool allowPlaybackSpeedChanging = true,
  21. List<double> playbackSpeeds = const [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],
  22. List<SystemUiOverlay>? systemOverlaysOnEnterFullScreen,
  23. List<DeviceOrientation>? deviceOrientationsOnEnterFullScreen,
  24. List<SystemUiOverlay> systemOverlaysAfterFullScreen = SystemUiOverlay.values,
  25. List<DeviceOrientation> deviceOrientationsAfterFullScreen = DeviceOrientation.values,
  26. ChewieRoutePageBuilder? routePageBuilder,
})

Implementation

ChewieController({
  required this.videoPlayerController,
  this.aspectRatio,
  this.autoInitialize = false,
  this.autoPlay = false,
  this.startAt,
  this.looping = false,
  this.fullScreenByDefault = false,
  this.cupertinoProgressColors,
  this.materialProgressColors,
  this.placeholder,
  this.overlay,
  this.showControlsOnInitialize = true,
  this.showControls = true,
  this.customControls,
  this.errorBuilder,
  this.allowedScreenSleep = true,
  this.isLive = false,
  this.allowFullScreen = true,
  this.allowMuting = true,
  this.allowPlaybackSpeedChanging = true,
  this.playbackSpeeds = const [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],
  this.systemOverlaysOnEnterFullScreen,
  this.deviceOrientationsOnEnterFullScreen,
  this.systemOverlaysAfterFullScreen = SystemUiOverlay.values,
  this.deviceOrientationsAfterFullScreen = DeviceOrientation.values,
  this.routePageBuilder,
})  : assert(videoPlayerController != null,
          'You must provide a controller to play a video'),
      assert(playbackSpeeds.every((speed) => speed > 0),
          'The playbackSpeeds values must all be greater than 0') {
  _initialize();
}