onScaleUpdate method
Future<void>
onScaleUpdate(
- Vector2 focalPoint,
- Vector2 focalPointDelta,
- double horizontalScale,
- double verticalScale,
- double scale,
- int pointerCount,
- double rotation,
- Duration? sourceTimestamp,
override
Implementation
@override
Future<void> onScaleUpdate(
Vector2 focalPoint,
Vector2 focalPointDelta,
double horizontalScale,
double verticalScale,
double scale,
int pointerCount,
double rotation,
Duration? sourceTimestamp) async {
if (pointerCount == 1) {
_inputDeltas[InputType.SCALE1] =
Vector3(focalPointDelta.x, focalPointDelta.y, 0);
} else if (pointerCount == 2) {
_inputDeltas[InputType.SCALE2] = Vector3(0, 0, scale);
} else {
throw UnimplementedError("Only pointerCount <= 2 supported");
}
}