SwipeDismissableNavHost

fun SwipeDismissableNavHost(navController: NavHostController, startNavDestination: NavDestination<*>, modifier: Modifier = Modifier, userSwipeEnabled: Boolean = true, state: SwipeDismissableNavHostState = rememberSwipeDismissableNavHostState(), route: String? = null, builder: NavGraphBuilder.() -> Unit)

Provides a place in the Compose hierarchy for self-contained navigation to occur, with backwards navigation provided by a swipe gesture.

Once this is called, any Composable within the given NavGraphBuilder can be navigated to from the provided navController.

The builder passed into this method is remembered. This means that for this NavHost, the contents of the builder cannot be changed.

This function wraps androidx.wear.compose.navigation.SwipeDismissableNavHost.

Parameters

navController

The navController for this host

startNavDestination

The start NavDestination

modifier

The modifier to be applied to the layout

userSwipeEnabled

Boolean Whether swipe-to-dismiss gesture is enabled.

state

State containing information about ongoing swipe and animation.

route

The route for the graph

builder

The builder used to construct the graph