androidx.wear.compose.navigation

Classes

SwipeDismissableNavHostState

State for SwipeDismissableNavHost

WearNavigator

Navigator that navigates through Composables.

WearNavigator.Destination

NavDestination specific to WearNavigator

Composables

SwipeDismissableNavHost

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

currentBackStackEntryAsState

Gets the current navigation back stack entry as a State.

rememberSwipeDismissableNavController

Creates a NavHostController that handles the adding of the WearNavigator from androidx.wear.compose.navigation.

rememberSwipeDismissableNavHostState

Create a SwipeToDismissBoxState and remember it.

Extension functions summary

Unit
NavGraphBuilder.composable(
    route: String,
    arguments: List<NamedNavArgument>,
    deepLinks: List<NavDeepLink>,
    content: @Composable (NavBackStackEntry) -> Unit
)

Utility function for building Wear Compose navigation graphs.

Extension functions

NavGraphBuilder.composable

fun NavGraphBuilder.composable(
    route: String,
    arguments: List<NamedNavArgument> = emptyList(),
    deepLinks: List<NavDeepLink> = emptyList(),
    content: @Composable (NavBackStackEntry) -> Unit
): Unit

Utility function for building Wear Compose navigation graphs.

Adds the content composable to the NavGraphBuilder as a WearNavigator.Destination.

Parameters
route: String

route for the destination

arguments: List<NamedNavArgument> = emptyList()

list of arguments to associate with destination

deepLinks: List<NavDeepLink> = emptyList()

list of deep links to associate with the destinations

content: @Composable (NavBackStackEntry) -> Unit

composable for the destination