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. Widget? placeholder,
  13. Widget? overlay,
  14. bool? showControlsOnInitialize,
  15. bool? showOptions,
  16. Future<void> optionsBuilder(
    1. BuildContext,
    2. List<OptionItem>
    )?,
  17. List<OptionItem> additionalOptions(
    1. BuildContext
    )?,
  18. bool? showControls,
  19. TransformationController? transformationController,
  20. bool? zoomAndPan,
  21. double? maxScale,
  22. Subtitles? subtitle,
  23. Widget subtitleBuilder(
    1. BuildContext,
    2. dynamic
    )?,
  24. Widget? customControls,
  25. Widget errorBuilder(
    1. BuildContext,
    2. String
    )?,
  26. bool? allowedScreenSleep,
  27. bool? isLive,
  28. bool? allowFullScreen,
  29. bool? allowMuting,
  30. bool? allowPlaybackSpeedChanging,
  31. bool? useRootNavigator,
  32. Duration? hideControlsTimer,
  33. EdgeInsets? controlsSafeAreaMinimum,
  34. List<double>? playbackSpeeds,
  35. List<SystemUiOverlay>? systemOverlaysOnEnterFullScreen,
  36. List<DeviceOrientation>? deviceOrientationsOnEnterFullScreen,
  37. List<SystemUiOverlay>? systemOverlaysAfterFullScreen,
  38. List<DeviceOrientation>? deviceOrientationsAfterFullScreen,
  39. Duration? progressIndicatorDelay,
  40. Widget routePageBuilder(
    1. BuildContext,
    2. Animation<double>,
    3. Animation<double>,
    4. ChewieControllerProvider,
    )?,
})

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,
  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,
  Widget Function(BuildContext, dynamic)? subtitleBuilder,
  Widget? customControls,
  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,
}) {
  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,
    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,
    subtitle: subtitle ?? this.subtitle,
    subtitleBuilder: subtitleBuilder ?? this.subtitleBuilder,
    customControls: customControls ?? this.customControls,
    errorBuilder: errorBuilder ?? this.errorBuilder,
    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,
  );
}