PhotoView constructor
const
PhotoView({
- Key? key,
- ValueNotifier? data,
- required ImageProvider<
Object> ? imageProvider, - PageController? pageController,
- LoadingBuilder? loadingBuilder,
- BoxDecoration? backgroundDecoration,
- bool gaplessPlayback = false,
- PhotoViewHeroAttributes? heroAttributes,
- ValueChanged<
PhotoViewScaleState> ? scaleStateChangedCallback, - bool enableRotation = false,
- PhotoViewControllerBase<
PhotoViewControllerValue> ? controller, - PhotoViewScaleStateController? scaleStateController,
- dynamic maxScale,
- dynamic minScale,
- dynamic initialScale,
- Alignment? basePosition,
- ScaleStateCycle? scaleStateCycle,
- PhotoViewImageTapUpCallback? onTapUp,
- PhotoViewImageTapDownCallback? onTapDown,
- PhotoViewImageScaleEndCallback? onScaleEnd,
- Size? customSize,
- HitTestBehavior? gestureDetectorBehavior,
- bool? tightMode,
- FilterQuality? filterQuality,
- bool? disableGestures,
- ImageErrorWidgetBuilder? errorBuilder,
- bool? enablePanAlways,
- bool enableScaleAndDoubleTap = true,
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
const PhotoView({
Key? key,
this.data,
required this.imageProvider,
this.pageController,
this.loadingBuilder,
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.onScaleEnd,
this.customSize,
this.gestureDetectorBehavior,
this.tightMode,
this.filterQuality,
this.disableGestures,
this.errorBuilder,
this.enablePanAlways,
this.enableScaleAndDoubleTap = true
}) : child = null,
childSize = null,
super(key: key);