onScaleChanged property
Callback fired when the user Ctrl+scrolls (or Cmd+scrolls on macOS) over the view, requesting a scale change.
When non-null, the library intercepts modifier+wheel events internally and calls this callback with the proposed new scale value.
The caller should update scale in response:
onScaleChanged: (newScale) {
setState(() => _scale = newScale.clamp(0.5, 3.0));
},
When null, modifier+wheel events are not intercepted and scroll normally.
Implementation
final ValueChanged<double>? onScaleChanged;