Pull To Refresh State
A UI state holder for the PullToRefresh composable.
This class manages the internal state machine for animations and nested scroll interactions, driven by the hoisted isRefreshing boolean.
Parameters
A CoroutineScope used to launch animations and state updates.
Properties
Cached NestedScrollConnection to avoid creating new instances on every scroll event.
The drag offset in pixels.
The progress of the pull gesture across the entire damped drag range, from 0.0 to 1.0 (where 1.0 represents the visual maximum). Unlike pullProgress which saturates at 1.0 once the threshold is reached, this value continues to grow as the user pulls further beyond the threshold.
The progress of the pull gesture, from 0.0 to 1.0, relative to the effective threshold (the larger of the visual threshold and the trigger threshold). With a trigger threshold below the visual threshold, RefreshState.ThresholdReached occurs before this reaches 1.0.
The current visual RefreshState of the component.
The pull progress threshold (0.0~1.0) at which a refresh is triggered, relative to the full damped drag range. Configured through rememberPullToRefreshState.
The visual scaling progress of the indicator, from 0.0 to 1.0. The scale-up completes at the smaller of the built-in visual threshold and the trigger threshold, so entering RefreshState.ThresholdReached always coincides with a fully scaled indicator.