switch_drag_decider
Logoheadless

switch_drag_decider#

Functions#

FunctionDescription
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#

ConstantDescription
kSwitchFlingVelocityThreshold Velocity threshold for fling-to-toggle behavior (px/sec).
kSwitchPositionThreshold Position threshold for toggle decision when no fling detected.