useChewieController function

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

Implementation

ChewieController useChewieController({
  Widget Function(BuildContext context, String subtitle)? subtitleBuilder,
  Subtitles? subtitle,
  required VideoPlayerController videoPlayerController,
  bool autoInitialize = false,
  bool autoPlay = false,
  Duration? startAt,
  bool looping = false,
  bool showControlsOnInitialize = true,
  bool showControls = true,
  Widget? customControls,
  Widget Function(BuildContext context, String errorMessage)? errorBuilder,
  double? aspectRatio,
  ChewieProgressColors? cupertinoProgressColors,
  ChewieProgressColors? materialProgressColors,
  Widget? placeholder,
  Widget? overlay,
  bool fullScreenByDefault = false,
  bool allowedScreenSleep = true,
  bool isLive = false,
  bool allowFullScreen = true,
  bool allowMuting = true,
  bool allowPlaybackSpeedChanging = true,
  List<double> playbackSpeeds = const [0.25, 0.5, 0.75, 1, 1.25, 1.5, 1.75, 2],
  List<SystemUiOverlay>? systemOverlaysOnEnterFullScreen,
  List<DeviceOrientation>? deviceOrientationsOnEnterFullScreen,
  List<SystemUiOverlay> systemOverlaysAfterFullScreen = SystemUiOverlay.values,
  List<DeviceOrientation> deviceOrientationsAfterFullScreen =
      DeviceOrientation.values,
  ChewieRoutePageBuilder? routePageBuilder,
  List<Object?>? keys,
}) {
  return use(_ChewieControllerHook(
    videoPlayerController: videoPlayerController,
    allowFullScreen: allowFullScreen,
    allowMuting: allowMuting,
    allowPlaybackSpeedChanging: allowPlaybackSpeedChanging,
    allowedScreenSleep: allowedScreenSleep,
    aspectRatio: aspectRatio,
    autoInitialize: autoInitialize,
    autoPlay: autoPlay,
    cupertinoProgressColors: cupertinoProgressColors,
    customControls: customControls,
    deviceOrientationsAfterFullScreen: deviceOrientationsAfterFullScreen,
    deviceOrientationsOnEnterFullScreen: deviceOrientationsOnEnterFullScreen,
    errorBuilder: errorBuilder,
    fullScreenByDefault: fullScreenByDefault,
    isLive: isLive,
    looping: looping,
    materialProgressColors: materialProgressColors,
    overlay: overlay,
    placeholder: placeholder,
    playbackSpeeds: playbackSpeeds,
    routePageBuilder: routePageBuilder,
    showControls: showControls,
    showControlsOnInitialize: showControlsOnInitialize,
    startAt: startAt,
    subtitle: subtitle,
    subtitleBuilder: subtitleBuilder,
    systemOverlaysAfterFullScreen: systemOverlaysAfterFullScreen,
    systemOverlaysOnEnterFullScreen: systemOverlaysOnEnterFullScreen,
    keys: keys,
  ));
}