PhotoView.customChild constructor

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

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.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,
})  : loadFailedChild = null,
      errorBuilder = null,
      imageProvider = null,
      gaplessPlayback = false,
      loadingBuilder = null,
      super(key: key);