Composable Function

rememberSwipeToDismissBoxState

Create a [SwipeToDismissBoxState] and remember it.

Android
Deprecated Please import rememberSwipeToDismissBoxState from androidx.wear.compose.foundation.

rememberSwipeToDismissBoxState

@Composable
public fun rememberSwipeToDismissBoxState(
    animationSpec: AnimationSpec<Float> = SWIPE_TO_DISMISS_BOX_ANIMATION_SPEC,
    confirmStateChange: (SwipeToDismissValue) -> Boolean = { true },
): SwipeToDismissBoxState

Create a SwipeToDismissBoxState and remember it.

Parameters

animationSpec The default animation used to animate to a new state.
confirmStateChange Optional callback to confirm or veto a pending state change.