PhotoView.customChild constructor Null safety

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

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

PhotoView.customChild({
  Key? key,
  required this.child,
  this.childSize,
  this.backgroundDecoration,
  this.wantKeepAlive = false,
  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,
})  : errorBuilder = null,
      imageProvider = null,
      gaplessPlayback = false,
      loadingBuilder = null,
      super(key: key);