PinchZoomReleaseUnzoomWidget constructor

const PinchZoomReleaseUnzoomWidget({
  1. required Widget child,
  2. Widget? zoomChild,
  3. Duration resetDuration = defaultResetDuration,
  4. Curve resetCurve = Curves.ease,
  5. EdgeInsets boundaryMargin = EdgeInsets.zero,
  6. Clip clipBehavior = Clip.none,
  7. double minScale = 0.8,
  8. double maxScale = 8,
  9. bool useOverlay = true,
  10. bool rootOverlay = false,
  11. double maxOverlayOpacity = 0.5,
  12. Color overlayColor = Colors.black,
  13. int fingersRequiredToPinch = 2,
  14. void twoFingersOn()?,
  15. void twoFingersOff()?,
  16. bool log = false,
  17. Key? key,
})

Create an PinchZoomReleaseUnzoomWidget, remeber that is just a little bit of customization over an interactive viewer

  • child is the widget used for zooming. This parameter is required because without a child there is nothing to zoom on

Implementation

const PinchZoomReleaseUnzoomWidget({
  required this.child,
  this.zoomChild,
  this.resetDuration = defaultResetDuration,
  this.resetCurve = Curves.ease,
  this.boundaryMargin = EdgeInsets.zero,
  this.clipBehavior = Clip.none,
  this.minScale = 0.8,
  this.maxScale = 8,
  this.useOverlay = true,
  this.rootOverlay = false,
  this.maxOverlayOpacity = 0.5,
  this.overlayColor = Colors.black,
  this.fingersRequiredToPinch = 2,
  this.twoFingersOn,
  this.twoFingersOff,
  this.log = false,
  super.key,
})  : assert(minScale > 0),
      assert(maxScale > 0),
      assert(maxScale >= minScale);