ZoomViewer constructor

const ZoomViewer({
  1. Key? key,
  2. required Widget child,
  3. double minScale = 0.5,
  4. double maxScale = 4.0,
  5. double initialScale = 1.0,
  6. bool enablePan = true,
  7. Color? backgroundColor,
  8. ValueChanged<double>? onScaleChanged,
  9. bool resetOnDoubleTap = true,
  10. Duration animationDuration = const Duration(milliseconds: 300),
  11. bool clipBehavior = true,
})

Implementation

const ZoomViewer({
  super.key,
  required this.child,
  this.minScale = 0.5,
  this.maxScale = 4.0,
  this.initialScale = 1.0,
  this.enablePan = true,
  this.backgroundColor,
  this.onScaleChanged,
  this.resetOnDoubleTap = true,
  this.animationDuration = const Duration(milliseconds: 300),
  this.clipBehavior = true,
})  : assert(minScale > 0 && minScale <= 1.0),
      assert(maxScale >= 1.0),
      assert(initialScale >= minScale && initialScale <= maxScale);