AVVideoPlayer.video constructor

const AVVideoPlayer.video(
  1. AVPlayerController controller, {
  2. Key? key,
  3. String? title,
  4. VoidCallback? onFullscreen,
  5. VoidCallback? onNext,
  6. VoidCallback? onPrevious,
  7. Widget controlsBuilder(
    1. BuildContext context,
    2. AVPlayerController controller
    )?,
  8. AVControlsConfig? controlsConfig,
  9. AVGestureConfig? gestureConfig,
})

Full video player preset — all controls, gestures, and PIP enabled.

AVVideoPlayer.video(controller, title: 'My Video')

Implementation

const AVVideoPlayer.video(
  this.controller, {
  super.key,
  this.title,
  this.onFullscreen,
  this.onNext,
  this.onPrevious,
  this.controlsBuilder,
  AVControlsConfig? controlsConfig,
  AVGestureConfig? gestureConfig,
})  : showControls = true,
      controlsConfig = controlsConfig ??
          const AVControlsConfig(
            showSkipButtons: true,
            showPipButton: true,
            showSpeedButton: true,
            showFullscreenButton: true,
            showLoopButton: true,
          ),
      gestureConfig = gestureConfig ??
          const AVGestureConfig(
            doubleTapToSeek: true,
            longPressSpeed: true,
            swipeToVolume: true,
            swipeToBrightness: true,
          );