computeSwipeSlop function
Determine the approriate pan slop pixels based on the kind
of pointer.
Implementation
double computeSwipeSlop(PointerDeviceKind kind) {
switch (kind) {
case PointerDeviceKind.mouse:
case PointerDeviceKind.trackpad:
return kPrecisePointerSwipeSlop;
case PointerDeviceKind.stylus:
case PointerDeviceKind.invertedStylus:
case PointerDeviceKind.unknown:
case PointerDeviceKind.touch:
return kSwipeSlop;
}
}