copyWith method

PhotoViewOptions copyWith({
  1. dynamic initialScale,
  2. dynamic minScale,
  3. dynamic maxScale,
  4. BoxDecoration? backgroundDecoration,
  5. FilterQuality? filterQuality,
  6. PhotoViewImageTapDownCallback? onTapDown,
  7. PhotoViewImageTapUpCallback? onTapUp,
  8. LoadingPlaceholderBuilder? loadingBuilder,
  9. ErrorPlaceholderBuilder? errorBuilder,
  10. Alignment? basePosition,
  11. PhotoViewControllerBase<PhotoViewControllerValue>? controller,
  12. Size? customSize,
  13. bool? disableGestures,
  14. bool? enablePanAlways,
  15. bool? enableRotation,
  16. bool? gaplessPlayback,
  17. HitTestBehavior? gestureDetectorBehavior,
  18. PhotoViewHeroAttributes? heroAttributes,
  19. PhotoViewImageScaleEndCallback? onScaleEnd,
  20. PhotoViewScaleStateController? scaleStateController,
  21. ValueChanged<PhotoViewScaleState>? scaleStateChangedCallback,
  22. ScaleStateCycle? scaleStateCycle,
  23. bool? tightMode,
  24. bool? wantKeepAlive,
})

Creates a copy of this value but with given fields replaced with the new values.

Implementation

PhotoViewOptions copyWith({
  dynamic initialScale,
  dynamic minScale,
  dynamic maxScale,
  BoxDecoration? backgroundDecoration,
  FilterQuality? filterQuality,
  PhotoViewImageTapDownCallback? onTapDown,
  PhotoViewImageTapUpCallback? onTapUp,
  LoadingPlaceholderBuilder? loadingBuilder,
  ErrorPlaceholderBuilder? errorBuilder,
  //
  Alignment? basePosition,
  PhotoViewControllerBase? controller,
  Size? customSize,
  bool? disableGestures,
  bool? enablePanAlways,
  bool? enableRotation,
  bool? gaplessPlayback,
  HitTestBehavior? gestureDetectorBehavior,
  PhotoViewHeroAttributes? heroAttributes,
  PhotoViewImageScaleEndCallback? onScaleEnd,
  PhotoViewScaleStateController? scaleStateController,
  ValueChanged<PhotoViewScaleState>? scaleStateChangedCallback,
  ScaleStateCycle? scaleStateCycle,
  bool? tightMode,
  bool? wantKeepAlive,
}) {
  return PhotoViewOptions(
    initialScale: initialScale ?? this.initialScale,
    minScale: minScale ?? this.minScale,
    maxScale: maxScale ?? this.maxScale,
    backgroundDecoration: backgroundDecoration ?? this.backgroundDecoration,
    filterQuality: filterQuality ?? this.filterQuality,
    onTapDown: onTapDown ?? this.onTapDown,
    onTapUp: onTapUp ?? this.onTapUp,
    loadingBuilder: loadingBuilder ?? this.loadingBuilder,
    errorBuilder: errorBuilder ?? this.errorBuilder,
    //
    basePosition: basePosition ?? this.basePosition,
    controller: controller ?? this.controller,
    customSize: customSize ?? this.customSize,
    disableGestures: disableGestures ?? this.disableGestures,
    enablePanAlways: enablePanAlways ?? this.enablePanAlways,
    enableRotation: enableRotation ?? this.enableRotation,
    gaplessPlayback: gaplessPlayback ?? this.gaplessPlayback,
    gestureDetectorBehavior: gestureDetectorBehavior ?? this.gestureDetectorBehavior,
    heroAttributes: heroAttributes ?? this.heroAttributes,
    onScaleEnd: onScaleEnd ?? this.onScaleEnd,
    scaleStateController: scaleStateController ?? this.scaleStateController,
    scaleStateChangedCallback: scaleStateChangedCallback ?? this.scaleStateChangedCallback,
    scaleStateCycle: scaleStateCycle ?? this.scaleStateCycle,
    tightMode: tightMode ?? this.tightMode,
    wantKeepAlive: wantKeepAlive ?? this.wantKeepAlive,
  );
}