ZoomViewer constructor
const
ZoomViewer({
- Key? key,
- required Widget child,
- double minScale = 0.5,
- double maxScale = 4.0,
- double initialScale = 1.0,
- bool enablePan = true,
- Color? backgroundColor,
- ValueChanged<
double> ? onScaleChanged, - bool resetOnDoubleTap = true,
- Duration animationDuration = const Duration(milliseconds: 300),
- 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);