Zoom constructor
Zoom({
- Key? key,
- double? maxZoomWidth,
- double? maxZoomHeight,
- required Widget child,
- @Deprecated('use maxZoomWidth instead') double? width,
- @Deprecated('use maxZoomHeight instead') double? height,
- void onPositionUpdate()?,
- void onScaleUpdate()?,
- Color backgroundColor = Colors.grey,
- Color canvasColor = Colors.white,
- double scrollWeight = 7.0,
- double opacityScrollBars = 0.5,
- Color colorScrollBars = Colors.black,
- bool centerOnScale = true,
- double initZoom = 1.0,
- bool enableScroll = true,
- double zoomSensibility = 1.0,
- bool doubleTapZoom = true,
- BoxShadow? canvasShadow,
- void onTap()?,
- Axis axis = Axis.horizontal,
Implementation
Zoom({
Key? key,
double? maxZoomWidth,
double? maxZoomHeight,
required this.child,
@Deprecated('use maxZoomWidth instead') double? width,
@Deprecated('use maxZoomHeight instead') double? height,
this.onPositionUpdate,
this.onScaleUpdate,
this.backgroundColor = Colors.grey,
this.canvasColor = Colors.white,
this.scrollWeight = 7.0,
this.opacityScrollBars = 0.5,
this.colorScrollBars = Colors.black,
this.centerOnScale = true,
this.initZoom = 1.0,
this.enableScroll = true,
this.zoomSensibility = 1.0,
this.doubleTapZoom = true,
this.canvasShadow,
this.onTap,
this.axis = Axis.horizontal,
}) : assert(
maxZoomWidth != null || width != null,
'maxZoomWidth or width must not be null',
),
assert(
maxZoomHeight != null || height != null,
'maxZoomHeight or height must not be null',
),
this.maxZoomHeight = (maxZoomHeight ?? height)!,
this.maxZoomWidth = (maxZoomWidth ?? width)!,
super(key: key);