Zoom constructor

Zoom({
  1. Color backgroundColor = Colors.grey,
  2. Color canvasColor = Colors.white,
  3. bool centerOnScale = true,
  4. required Widget child,
  5. Color colorScrollBars = Colors.black12,
  6. Duration doubleTapAnimDuration = const Duration(milliseconds: 300),
  7. double doubleTapScaleChange = 1.1,
  8. bool doubleTapZoom = true,
  9. bool enableScroll = true,
  10. Offset? initPosition,
  11. double? initScale,
  12. bool initTotalZoomOut = false,
  13. Key? key,
  14. double maxScale = 2.5,
  15. double? maxZoomHeight,
  16. double? maxZoomWidth,
  17. dynamic onPositionUpdate(
    1. Offset
    )?,
  18. dynamic onScaleUpdate(
    1. double,
    2. double
    )?,
  19. dynamic onPanUpPosition(
    1. Offset
    )?,
  20. dynamic onMinZoom(
    1. bool
    )?,
  21. dynamic onTap()?,
  22. double opacityScrollBars = 0.5,
  23. double radiusScrollBars = 4,
  24. double scrollWeight = 10,
  25. TransformationController? transformationController,
  26. 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);