copyWith method

BetterPlayerConfiguration copyWith(
  1. {double? aspectRatio,
  2. bool? autoPlay,
  3. Duration? startAt,
  4. bool? looping,
  5. bool? fullScreenByDefault,
  6. Widget? placeholder,
  7. bool? showPlaceholderUntilPlay,
  8. bool? placeholderOnTop,
  9. Widget? overlay,
  10. bool? showControlsOnInitialize,
  11. Widget errorBuilder(
    1. BuildContext context,
    2. String? errorMessage
    )?,
  12. bool? allowedScreenSleep,
  13. double? fullScreenAspectRatio,
  14. List<DeviceOrientation>? deviceOrientationsOnFullScreen,
  15. List<SystemUiOverlay>? systemOverlaysAfterFullScreen,
  16. List<DeviceOrientation>? deviceOrientationsAfterFullScreen,
  17. BetterPlayerRoutePageBuilder? routePageBuilder,
  18. dynamic eventListener(
    1. BetterPlayerEvent
    )?,
  19. BetterPlayerSubtitlesConfiguration? subtitlesConfiguration,
  20. BetterPlayerControlsConfiguration? controlsConfiguration,
  21. BoxFit? fit,
  22. double? rotation,
  23. dynamic playerVisibilityChangedBehavior(
    1. double visibilityFraction
    )?,
  24. List<BetterPlayerTranslations>? translations,
  25. bool? autoDetectFullscreenDeviceOrientation,
  26. bool? handleLifecycle,
  27. bool? autoDispose,
  28. bool? expandToFill,
  29. bool? useRootNavigator}
)

Implementation

BetterPlayerConfiguration copyWith({
  double? aspectRatio,
  bool? autoPlay,
  Duration? startAt,
  bool? looping,
  bool? fullScreenByDefault,
  Widget? placeholder,
  bool? showPlaceholderUntilPlay,
  bool? placeholderOnTop,
  Widget? overlay,
  bool? showControlsOnInitialize,
  Widget Function(BuildContext context, String? errorMessage)? errorBuilder,
  bool? allowedScreenSleep,
  double? fullScreenAspectRatio,
  List<DeviceOrientation>? deviceOrientationsOnFullScreen,
  List<SystemUiOverlay>? systemOverlaysAfterFullScreen,
  List<DeviceOrientation>? deviceOrientationsAfterFullScreen,
  BetterPlayerRoutePageBuilder? routePageBuilder,
  Function(BetterPlayerEvent)? eventListener,
  BetterPlayerSubtitlesConfiguration? subtitlesConfiguration,
  BetterPlayerControlsConfiguration? controlsConfiguration,
  BoxFit? fit,
  double? rotation,
  Function(double visibilityFraction)? playerVisibilityChangedBehavior,
  List<BetterPlayerTranslations>? translations,
  bool? autoDetectFullscreenDeviceOrientation,
  bool? handleLifecycle,
  bool? autoDispose,
  bool? expandToFill,
  bool? useRootNavigator,
}) {
  return BetterPlayerConfiguration(
    aspectRatio: aspectRatio ?? this.aspectRatio,
    autoPlay: autoPlay ?? this.autoPlay,
    startAt: startAt ?? this.startAt,
    looping: looping ?? this.looping,
    fullScreenByDefault: fullScreenByDefault ?? this.fullScreenByDefault,
    placeholder: placeholder ?? this.placeholder,
    showPlaceholderUntilPlay:
        showPlaceholderUntilPlay ?? this.showPlaceholderUntilPlay,
    placeholderOnTop: placeholderOnTop ?? this.placeholderOnTop,
    overlay: overlay ?? this.overlay,
    errorBuilder: errorBuilder ?? this.errorBuilder,
    allowedScreenSleep: allowedScreenSleep ?? this.allowedScreenSleep,
    fullScreenAspectRatio:
        fullScreenAspectRatio ?? this.fullScreenAspectRatio,
    deviceOrientationsOnFullScreen:
        deviceOrientationsOnFullScreen ?? this.deviceOrientationsOnFullScreen,
    systemOverlaysAfterFullScreen:
        systemOverlaysAfterFullScreen ?? this.systemOverlaysAfterFullScreen,
    deviceOrientationsAfterFullScreen: deviceOrientationsAfterFullScreen ??
        this.deviceOrientationsAfterFullScreen,
    routePageBuilder: routePageBuilder ?? this.routePageBuilder,
    eventListener: eventListener ?? this.eventListener,
    subtitlesConfiguration:
        subtitlesConfiguration ?? this.subtitlesConfiguration,
    controlsConfiguration:
        controlsConfiguration ?? this.controlsConfiguration,
    fit: fit ?? this.fit,
    rotation: rotation ?? this.rotation,
    playerVisibilityChangedBehavior: playerVisibilityChangedBehavior ??
        this.playerVisibilityChangedBehavior,
    translations: translations ?? this.translations,
    autoDetectFullscreenDeviceOrientation:
        autoDetectFullscreenDeviceOrientation ??
            this.autoDetectFullscreenDeviceOrientation,
    handleLifecycle: handleLifecycle ?? this.handleLifecycle,
    autoDispose: autoDispose ?? this.autoDispose,
    expandToFill: expandToFill ?? this.expandToFill,
    useRootNavigator: useRootNavigator ?? this.useRootNavigator,
  );
}