setZoom method
Implementation
double setZoom(double scale) {
final prevScale = viewportScale;
final nextScale = clampedScale(scale);
_viewport.scale = nextScale;
_event.emit(
"zoom",
ZoomEventData(prevScale: prevScale, nextScale: nextScale),
);
return nextScale;
}