setZoom method

void setZoom(
  1. double scale
)

Updates zoom level to scale (clamped between 0.4x and 3.0x).

Implementation

void setZoom(double scale) {
  final target = scale.clamp(0.4, 3.0);
  _zoom = target;
  onSetZoom?.call(target);
  _notify();
}