Composable Function

rememberSwipeToDismissBoxState

Create a SwipeToDismissBoxState and remember it.

rememberSwipeToDismissBoxState

Source set: Android
@Deprecated(
    "Please import rememberSwipeToDismissBoxState from androidx.wear.compose.foundation.",
    ReplaceWith(
        "androidx.wear.compose.foundation.rememberSwipeToDismissBoxState(",
        "animationSpec, confirmStateChange)",
    ),
)
@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.
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: