SwipeToDismissBoxState
Class
Android
Deprecated SwipeToDismissBoxState has been migrated, please import it from androidx.wear.compose.foundation.
public class SwipeToDismissBoxState(
animationSpec: AnimationSpec<Float> = SwipeToDismissBoxDefaults.AnimationSpec,
confirmStateChange: (SwipeToDismissValue) -> Boolean = { true },
)
State for SwipeToDismissBox
.
Parameters
animationSpec | The default animation that will be used to animate to a new state. |
confirmStateChange | Optional callback invoked to confirm or veto a pending state change. |
Functions
public suspend fun snapTo(targetValue: SwipeToDismissValue): Unit
Set the state without any animation and suspend until it's set
Parameters
targetValue | The new target value to set currentValue to. |