SwipeToDismissBoxState
State of the SwipeToDismissBox composable.
Constructors
State of the SwipeToDismissBox composable.
State of the SwipeToDismissBox composable.
Properties
The current state value of the SwipeToDismissBoxState.
The direction (if any) in which the composable has been or is being dismissed.
The value the SwipeToDismissBoxState is currently settled at. When progressing through multiple anchors, e.g. A -> B -> C, settledValue will stay the same until settled at an anchor, while currentValue will update to the closest anchor.
The target state. This is the closest state to the current offset (taking into account positional thresholds). If no interactions like animations or drags are in progress, this will be the current state.
Functions
Dismiss the component in the given direction, with an animation and suspend. This method will throw CancellationException if the animation is interrupted
Require the current offset.
Set the state without any animation and suspend until it's set