copyWith method

ChewieController copyWith({
  1. VideoPlayerController? videoPlayerController,
  2. OptionsTranslation? optionsTranslation,
  3. double? aspectRatio,
  4. bool? autoInitialize,
  5. bool? autoPlay,
  6. bool? draggableProgressBar,
  7. Duration? startAt,
  8. bool? looping,
  9. bool? fullScreenByDefault,
  10. ChewieProgressColors? cupertinoProgressColors,
  11. ChewieProgressColors? materialProgressColors,
  12. Duration? materialSeekButtonFadeDuration,
  13. double? materialSeekButtonSize,
  14. Widget? placeholder,
  15. Widget? overlay,
  16. bool? showControlsOnInitialize,
  17. bool? showOptions,
  18. Future<void> optionsBuilder(
    1. BuildContext,
    2. List<OptionItem>
    )?,
  19. List<OptionItem> additionalOptions(
    1. BuildContext
    )?,
  20. bool? showControls,
  21. TransformationController? transformationController,
  22. bool? zoomAndPan,
  23. double? maxScale,
  24. Subtitles? subtitle,
  25. bool? showSubtitles,
  26. Widget subtitleBuilder(
    1. BuildContext,
    2. dynamic
    )?,
  27. Widget? customControls,
  28. WidgetBuilder? bufferingBuilder,
  29. Widget errorBuilder(
    1. BuildContext,
    2. String
    )?,
  30. bool? allowedScreenSleep,
  31. bool? isLive,
  32. bool? allowFullScreen,
  33. bool? allowMuting,
  34. bool? allowPlaybackSpeedChanging,
  35. bool? useRootNavigator,
  36. Duration? hideControlsTimer,
  37. EdgeInsets? controlsSafeAreaMinimum,
  38. List<double>? playbackSpeeds,
  39. List<SystemUiOverlay>? systemOverlaysOnEnterFullScreen,
  40. List<DeviceOrientation>? deviceOrientationsOnEnterFullScreen,
  41. List<SystemUiOverlay>? systemOverlaysAfterFullScreen,
  42. List<DeviceOrientation>? deviceOrientationsAfterFullScreen,
  43. Duration? progressIndicatorDelay,
  44. Widget routePageBuilder(
    1. BuildContext,
    2. Animation<double>,
    3. Animation<double>,
    4. ChewieControllerProvider,
    )?,
  45. bool? pauseOnBackgroundTap,
})

Implementation

ChewieController copyWith({
  VideoPlayerController? videoPlayerController,
  OptionsTranslation? optionsTranslation,
  double? aspectRatio,
  bool? autoInitialize,
  bool? autoPlay,
  bool? draggableProgressBar,
  Duration? startAt,
  bool? looping,
  bool? fullScreenByDefault,
  ChewieProgressColors? cupertinoProgressColors,
  ChewieProgressColors? materialProgressColors,
  Duration? materialSeekButtonFadeDuration,
  double? materialSeekButtonSize,
  Widget? placeholder,
  Widget? overlay,
  bool? showControlsOnInitialize,
  bool? showOptions,
  Future<void> Function(BuildContext, List<OptionItem>)? optionsBuilder,
  List<OptionItem> Function(BuildContext)? additionalOptions,
  bool? showControls,
  TransformationController? transformationController,
  bool? zoomAndPan,
  double? maxScale,
  Subtitles? subtitle,
  bool? showSubtitles,
  Widget Function(BuildContext, dynamic)? subtitleBuilder,
  Widget? customControls,
  WidgetBuilder? bufferingBuilder,
  Widget Function(BuildContext, String)? errorBuilder,
  bool? allowedScreenSleep,
  bool? isLive,
  bool? allowFullScreen,
  bool? allowMuting,
  bool? allowPlaybackSpeedChanging,
  bool? useRootNavigator,
  Duration? hideControlsTimer,
  EdgeInsets? controlsSafeAreaMinimum,
  List<double>? playbackSpeeds,
  List<SystemUiOverlay>? systemOverlaysOnEnterFullScreen,
  List<DeviceOrientation>? deviceOrientationsOnEnterFullScreen,
  List<SystemUiOverlay>? systemOverlaysAfterFullScreen,
  List<DeviceOrientation>? deviceOrientationsAfterFullScreen,
  Duration? progressIndicatorDelay,
  Widget Function(
    BuildContext,
    Animation<double>,
    Animation<double>,
    ChewieControllerProvider,
  )?
  routePageBuilder,
  bool? pauseOnBackgroundTap,
}) {
  return ChewieController(
    draggableProgressBar: draggableProgressBar ?? this.draggableProgressBar,
    videoPlayerController:
        videoPlayerController ?? this.videoPlayerController,
    optionsTranslation: optionsTranslation ?? this.optionsTranslation,
    aspectRatio: aspectRatio ?? this.aspectRatio,
    autoInitialize: autoInitialize ?? this.autoInitialize,
    autoPlay: autoPlay ?? this.autoPlay,
    startAt: startAt ?? this.startAt,
    looping: looping ?? this.looping,
    fullScreenByDefault: fullScreenByDefault ?? this.fullScreenByDefault,
    cupertinoProgressColors:
        cupertinoProgressColors ?? this.cupertinoProgressColors,
    materialProgressColors:
        materialProgressColors ?? this.materialProgressColors,
    zoomAndPan: zoomAndPan ?? this.zoomAndPan,
    maxScale: maxScale ?? this.maxScale,
    controlsSafeAreaMinimum:
        controlsSafeAreaMinimum ?? this.controlsSafeAreaMinimum,
    transformationController:
        transformationController ?? this.transformationController,
    materialSeekButtonFadeDuration:
        materialSeekButtonFadeDuration ?? this.materialSeekButtonFadeDuration,
    materialSeekButtonSize:
        materialSeekButtonSize ?? this.materialSeekButtonSize,
    placeholder: placeholder ?? this.placeholder,
    overlay: overlay ?? this.overlay,
    showControlsOnInitialize:
        showControlsOnInitialize ?? this.showControlsOnInitialize,
    showOptions: showOptions ?? this.showOptions,
    optionsBuilder: optionsBuilder ?? this.optionsBuilder,
    additionalOptions: additionalOptions ?? this.additionalOptions,
    showControls: showControls ?? this.showControls,
    showSubtitles: showSubtitles ?? this.showSubtitles,
    subtitle: subtitle ?? this.subtitle,
    subtitleBuilder: subtitleBuilder ?? this.subtitleBuilder,
    customControls: customControls ?? this.customControls,
    errorBuilder: errorBuilder ?? this.errorBuilder,
    bufferingBuilder: bufferingBuilder ?? this.bufferingBuilder,
    allowedScreenSleep: allowedScreenSleep ?? this.allowedScreenSleep,
    isLive: isLive ?? this.isLive,
    allowFullScreen: allowFullScreen ?? this.allowFullScreen,
    allowMuting: allowMuting ?? this.allowMuting,
    allowPlaybackSpeedChanging:
        allowPlaybackSpeedChanging ?? this.allowPlaybackSpeedChanging,
    useRootNavigator: useRootNavigator ?? this.useRootNavigator,
    playbackSpeeds: playbackSpeeds ?? this.playbackSpeeds,
    systemOverlaysOnEnterFullScreen:
        systemOverlaysOnEnterFullScreen ??
        this.systemOverlaysOnEnterFullScreen,
    deviceOrientationsOnEnterFullScreen:
        deviceOrientationsOnEnterFullScreen ??
        this.deviceOrientationsOnEnterFullScreen,
    systemOverlaysAfterFullScreen:
        systemOverlaysAfterFullScreen ?? this.systemOverlaysAfterFullScreen,
    deviceOrientationsAfterFullScreen:
        deviceOrientationsAfterFullScreen ??
        this.deviceOrientationsAfterFullScreen,
    routePageBuilder: routePageBuilder ?? this.routePageBuilder,
    hideControlsTimer: hideControlsTimer ?? this.hideControlsTimer,
    progressIndicatorDelay:
        progressIndicatorDelay ?? this.progressIndicatorDelay,
    pauseOnBackgroundTap: pauseOnBackgroundTap ?? this.pauseOnBackgroundTap,
  );
}