doubleTabZoomOutScale property
To determine the scale to zoom out to when double tapping
Implementation
@protected
double get doubleTabZoomOutScale {
switch (doubleTapZoomOutBehaviour) {
case DoubleTapZoomOutBehaviour.zoomOutToMatchHeight:
return widgetViewport.height / childBoundaryRect.height;
case DoubleTapZoomOutBehaviour.zoomOutToMatchWidth:
return widgetViewport.width / childBoundaryRect.width;
case DoubleTapZoomOutBehaviour.zoomOutToMinScale:
double widthScale = widgetViewport.width / childBoundaryRect.width;
double heightScale = widgetViewport.height / childBoundaryRect.height;
return math.min(widthScale, heightScale);
}
}