PhotoView constructor

PhotoView(
  1. {Key key,
  2. @required ImageProvider<Object> imageProvider,
  3. LoadingBuilder loadingBuilder,
  4. Widget loadFailedChild,
  5. Decoration backgroundDecoration,
  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. Size customSize,
  20. HitTestBehavior gestureDetectorBehavior,
  21. bool tightMode,
  22. FilterQuality filterQuality,
  23. bool disableGestures,
  24. ImageErrorWidgetBuilder errorBuilder}
)

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.loadFailedChild,
  this.backgroundDecoration,
  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.customSize,
  this.gestureDetectorBehavior,
  this.tightMode,
  this.filterQuality,
  this.disableGestures,
  this.errorBuilder,
})  : child = null,
      childSize = null,
      super(key: key);