PhotoView.customChild constructor

const PhotoView.customChild({
  1. Key? key,
  2. ValueNotifier? data,
  3. required Widget? child,
  4. PageController? pageController,
  5. Size? childSize,
  6. BoxDecoration? backgroundDecoration,
  7. PhotoViewHeroAttributes? heroAttributes,
  8. ValueChanged<PhotoViewScaleState>? scaleStateChangedCallback,
  9. bool enableRotation = false,
  10. PhotoViewControllerBase<PhotoViewControllerValue>? controller,
  11. PhotoViewScaleStateController? scaleStateController,
  12. dynamic maxScale,
  13. dynamic minScale,
  14. dynamic initialScale,
  15. Alignment? basePosition,
  16. ScaleStateCycle? scaleStateCycle,
  17. PhotoViewImageTapUpCallback? onTapUp,
  18. PhotoViewImageTapDownCallback? onTapDown,
  19. PhotoViewImageScaleEndCallback? onScaleEnd,
  20. Size? customSize,
  21. HitTestBehavior? gestureDetectorBehavior,
  22. bool? tightMode,
  23. FilterQuality? filterQuality,
  24. bool? disableGestures,
  25. bool? enablePanAlways,
  26. bool enableScaleAndDoubleTap = true,
})

Creates a widget that displays a zoomable child.

It has been created to resemble PhotoView behavior within widgets that aren't an image, such as Container, Text or a svg.

Instead of a imageProvider, this constructor will receive a child and a childSize.

Implementation

const PhotoView.customChild({
  Key? key,
  this.data,
  required this.child,
  this.pageController,
  this.childSize,
  this.backgroundDecoration,
  this.heroAttributes,
  this.scaleStateChangedCallback,
  this.enableRotation = false,
  this.controller,
  this.scaleStateController,
  this.maxScale,
  this.minScale,
  this.initialScale,
  this.basePosition,
  this.scaleStateCycle,
  this.onTapUp,
  this.onTapDown,
  this.onScaleEnd,
  this.customSize,
  this.gestureDetectorBehavior,
  this.tightMode,
  this.filterQuality,
  this.disableGestures,
  this.enablePanAlways,
  this.enableScaleAndDoubleTap = true
})  : errorBuilder = null,
      imageProvider = null,
      gaplessPlayback = false,
      loadingBuilder = null,
      super(key: key);