switch_drag_decider#
Functions#
| Function | Description |
|---|---|
| computeDragVisualValue | Computes the preview visual value during drag. |
| computeNextValue | Computes the next switch value based on drag position and velocity. |
| computeTravelPx | Computes the thumb travel distance in pixels using Flutter's trackInnerLength formula. |
| initialDragT | Computes the initial drag T from the current switch value. |
| updateDragT | Updates the drag position based on horizontal drag delta. |
Constants#
| Constant | Description |
|---|---|
| kSwitchFlingVelocityThreshold | Velocity threshold for fling-to-toggle behavior (px/sec). |
| kSwitchPositionThreshold | Position threshold for toggle decision when no fling detected. |