Zoomable constructor

const Zoomable({
  1. Key? key,
  2. required ZoomableController controller,
  3. required Rect boundary,
  4. double minZoomLevel = 1.0,
  5. double maxZoomLevel = 15.0,
  6. bool enablePinching = true,
  7. bool enablePanning = true,
  8. bool enableDoubleTapZooming = true,
  9. double frictionCoefficient = 0.005,
  10. Duration animationDuration = const Duration(milliseconds: 600),
  11. ZoomableUpdateCallback? onWillUpdate,
  12. ZoomableCompleteCallback? onComplete,
  13. Widget? child,
})

Creates a Zoomable.

Implementation

const Zoomable({
  Key? key,
  required this.controller,
  required this.boundary,
  this.minZoomLevel = 1.0,
  this.maxZoomLevel = 15.0,
  this.enablePinching = true,
  this.enablePanning = true,
  this.enableDoubleTapZooming = true,
  this.frictionCoefficient = 0.005,
  this.animationDuration = const Duration(milliseconds: 600),
  this.onWillUpdate,
  this.onComplete,
  this.child,
})  : assert(minZoomLevel >= 1 && minZoomLevel <= maxZoomLevel),
      assert(frictionCoefficient > 0.0),
      super(key: key);