PhotoView constructor Null safety

PhotoView(
  1. {Key? key,
  2. required ImageProvider<Object>? imageProvider,
  3. LoadingBuilder? loadingBuilder,
  4. BoxDecoration? backgroundDecoration,
  5. bool wantKeepAlive = false,
  6. bool gaplessPlayback = false,
  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. ImageErrorWidgetBuilder? errorBuilder,
  26. bool? enablePanAlways}
)

Creates a widget that displays a zoomable image.

To show an image from the network or from an asset bundle, use their respective image providers, ie: AssetImage or NetworkImage

Internally, the image is rendered within an Image widget.

Implementation

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