computeSwipeSlop function

double computeSwipeSlop(
  1. PointerDeviceKind kind
)

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;
  }
}