panZoomUpdate method Null safety
Create a PointerPanZoomUpdateEvent to update the active pan/zoom sequence on this pointer with updated pan, scale, and/or rotation values.
rotation
is in units of radians.
By default, the time stamp on the event is Duration.zero. You can give a
specific time stamp by passing the timeStamp
argument.
Implementation
PointerPanZoomUpdateEvent panZoomUpdate(
Offset location, {
Offset pan = Offset.zero,
double scale = 1,
double rotation = 0,
Duration timeStamp = Duration.zero,
}) {
assert(isPanZoomActive);
assert(kind == PointerDeviceKind.trackpad);
_location = location;
final Offset panDelta = pan - _pan!;
_pan = pan;
return PointerPanZoomUpdateEvent(
timeStamp: timeStamp,
device: _device,
pointer: pointer,
position: location,
pan: pan,
panDelta: panDelta,
scale: scale,
rotation: rotation,
);
}