computeHitSlop function Null safety

double computeHitSlop(
  1. PointerDeviceKind kind
)

Determine the appropriate hit slop pixels based on the kind of pointer.

Implementation

double computeHitSlop(PointerDeviceKind kind) {
  switch (kind) {
    case PointerDeviceKind.mouse:
      return kPrecisePointerHitSlop;
    case PointerDeviceKind.stylus:
    case PointerDeviceKind.invertedStylus:
    case PointerDeviceKind.unknown:
    case PointerDeviceKind.touch:
      return kTouchSlop;
  }
}