handleScaleUpdate method

  1. @override
void handleScaleUpdate(
  1. ScaleUpdateDetails details
)

Called when the pointers in contact with the screen have indicated a new scale.

Implementation

@override
void handleScaleUpdate(ScaleUpdateDetails details) {
  if (details.pointerCount == 1 || !enablePinching) {
    return;
  }
  final RenderBehaviorArea? parent = parentBox as RenderBehaviorArea?;
  if (parent == null) {
    return;
  }
  final RenderCartesianAxes? axes = parent.cartesianAxes;

  if (axes == null) {
    return;
  }
  if (details.pointerCount == 2) {
    parent.hideInteractiveTooltip();
    _pinchZoom(axes, parent, details, details.localFocalPoint);
  }
}