Zoom constructor
Zoom({
- Color backgroundColor = Colors.grey,
- Color canvasColor = Colors.white,
- bool centerOnScale = true,
- required Widget child,
- Color colorScrollBars = Colors.black12,
- Duration doubleTapAnimDuration = const Duration(milliseconds: 300),
- double doubleTapScaleChange = 1.1,
- bool doubleTapZoom = true,
- bool enableScroll = true,
- Offset? initPosition,
- double? initScale,
- bool initTotalZoomOut = false,
- Key? key,
- double maxScale = 2.5,
- double? maxZoomHeight,
- double? maxZoomWidth,
- dynamic onPositionUpdate()?,
- dynamic onScaleUpdate()?,
- dynamic onPanUpPosition()?,
- dynamic onMinZoom()?,
- dynamic onTap()?,
- double opacityScrollBars = 0.5,
- double radiusScrollBars = 4,
- double scrollWeight = 10,
- TransformationController? transformationController,
- double zoomSensibility = 1.0,
Implementation
Zoom({
this.backgroundColor = Colors.grey,
this.canvasColor = Colors.white,
this.centerOnScale = true,
required this.child,
this.colorScrollBars = Colors.black12,
this.doubleTapAnimDuration = const Duration(milliseconds: 300),
this.doubleTapScaleChange = 1.1,
this.doubleTapZoom = true,
this.enableScroll = true,
this.initPosition,
this.initScale,
this.initTotalZoomOut = false,
Key? key,
this.maxScale = 2.5,
this.maxZoomHeight,
this.maxZoomWidth,
this.onPositionUpdate,
this.onScaleUpdate,
this.onPanUpPosition,
this.onMinZoom,
this.onTap,
this.opacityScrollBars = 0.5,
this.radiusScrollBars = 4,
this.scrollWeight = 10,
this.transformationController,
this.zoomSensibility = 1.0,
}) : assert(maxScale > 0),
assert(!maxScale.isNaN),
super(key: key);