BetterPlayerConfiguration constructor
const
BetterPlayerConfiguration({
- double? aspectRatio,
- bool autoPlay = false,
- Duration? startAt,
- bool looping = false,
- bool fullScreenByDefault = false,
- Widget? placeholder,
- bool showPlaceholderUntilPlay = false,
- bool placeholderOnTop = true,
- Widget? overlay,
- Widget errorBuilder(
- BuildContext context,
- String? errorMessage
- bool allowedScreenSleep = true,
- double? fullScreenAspectRatio,
- List<
DeviceOrientation> deviceOrientationsOnFullScreen = const [DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight], - List<
SystemUiOverlay> systemOverlaysAfterFullScreen = SystemUiOverlay.values, - List<
DeviceOrientation> deviceOrientationsAfterFullScreen = const [DeviceOrientation.portraitUp, DeviceOrientation.portraitDown, DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight], - BetterPlayerRoutePageBuilder? routePageBuilder,
- dynamic eventListener()?,
- BetterPlayerSubtitlesConfiguration subtitlesConfiguration = const BetterPlayerSubtitlesConfiguration(),
- BetterPlayerControlsConfiguration controlsConfiguration = const BetterPlayerControlsConfiguration(),
- BoxFit fit = BoxFit.fill,
- double rotation = 0,
- dynamic playerVisibilityChangedBehavior(
- double visibilityFraction
- List<
BetterPlayerTranslations> ? translations, - bool autoDetectFullscreenDeviceOrientation = false,
- bool autoDetectFullscreenAspectRatio = false,
- bool handleLifecycle = true,
- bool autoDispose = true,
- bool expandToFill = true,
Implementation
const BetterPlayerConfiguration({
this.aspectRatio,
this.autoPlay = false,
this.startAt,
this.looping = false,
this.fullScreenByDefault = false,
this.placeholder,
this.showPlaceholderUntilPlay = false,
this.placeholderOnTop = true,
this.overlay,
this.errorBuilder,
this.allowedScreenSleep = true,
this.fullScreenAspectRatio,
this.deviceOrientationsOnFullScreen = const [
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
],
this.systemOverlaysAfterFullScreen = SystemUiOverlay.values,
this.deviceOrientationsAfterFullScreen = const [
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
DeviceOrientation.landscapeLeft,
DeviceOrientation.landscapeRight,
],
this.routePageBuilder,
this.eventListener,
this.subtitlesConfiguration = const BetterPlayerSubtitlesConfiguration(),
this.controlsConfiguration = const BetterPlayerControlsConfiguration(),
this.fit = BoxFit.fill,
this.rotation = 0,
this.playerVisibilityChangedBehavior,
this.translations,
this.autoDetectFullscreenDeviceOrientation = false,
this.autoDetectFullscreenAspectRatio = false,
this.handleLifecycle = true,
this.autoDispose = true,
this.expandToFill = true,
this.useRootNavigator = false,
});