computePanSlop function
- PointerDeviceKind kind,
- DeviceGestureSettings? settings
Determine the appropriate pan slop pixels based on the kind
of pointer.
Implementation
double computePanSlop(PointerDeviceKind kind, DeviceGestureSettings? settings) {
switch (kind) {
case PointerDeviceKind.mouse:
return kPrecisePointerPanSlop;
case PointerDeviceKind.stylus:
case PointerDeviceKind.invertedStylus:
case PointerDeviceKind.unknown:
case PointerDeviceKind.touch:
case PointerDeviceKind.trackpad:
return settings?.panSlop ?? kPanSlop;
}
}