Zoom constructor

Zoom({
  1. Key? key,
  2. double? maxZoomWidth,
  3. double? maxZoomHeight,
  4. required Widget child,
  5. @Deprecated('use maxZoomWidth instead') double? width,
  6. @Deprecated('use maxZoomHeight instead') double? height,
  7. void onPositionUpdate(
    1. Offset
    )?,
  8. void onScaleUpdate(
    1. double,
    2. double
    )?,
  9. Color backgroundColor = Colors.grey,
  10. Color canvasColor = Colors.white,
  11. double scrollWeight = 7.0,
  12. double opacityScrollBars = 0.5,
  13. Color colorScrollBars = Colors.black,
  14. bool centerOnScale = true,
  15. double initZoom = 1.0,
  16. bool enableScroll = true,
  17. double zoomSensibility = 1.0,
  18. bool doubleTapZoom = true,
  19. BoxShadow? canvasShadow,
  20. void onTap()?,
  21. 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);