Composable Function

rememberSwipeDismissableNavHostState

Create a SwipeToDismissBoxState and remember it.

rememberSwipeDismissableNavHostState

Source set: Android
@Composable
public fun rememberSwipeDismissableNavHostState(
    swipeToDismissBoxState: SwipeToDismissBoxState = rememberSwipeToDismissBoxState()
): SwipeDismissableNavHostState

Create a SwipeToDismissBoxState and remember it.

Parameters

swipeToDismissBoxState State for BasicSwipeToDismissBox, which is used to support the swipe-to-dismiss gesture in SwipeDismissableNavHost and can also be used to support edge-swiping, using edgeSwipeToDismiss. This parameter is unused after API 36, because the platform supports edge-swiping via predictive back gesture, and SwipeDismissableNavHost drops the use of BasicSwipeToDismissBox in favour of predictive back based navigation.

rememberSwipeDismissableNavHostState

Source set: Android
@Deprecated(
    "This overload is provided for backward compatibility. A newer overload is available " +
        "which uses SwipeToDismissBoxState from androidx.wear.compose.foundation package.",
    level = DeprecationLevel.HIDDEN,
)
@Composable
public fun rememberSwipeDismissableNavHostState(
    swipeToDismissBoxState: androidx.wear.compose.material.SwipeToDismissBoxState =
        androidx.wear.compose.material.rememberSwipeToDismissBoxState()
): SwipeDismissableNavHostState
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: