Android 12 Developer Preview is here! Try it out, and give us your feedback!

NavGraphBuilder

open class NavGraphBuilder : NavDestinationBuilder<NavGraph>
kotlin.Any
   ↳ androidx.navigation.NavDestinationBuilder<androidx.navigation.NavGraph>
   ↳ androidx.navigation.NavGraphBuilder

DSL for constructing a new NavGraph

Summary

Public constructors
<init>(provider: NavigatorProvider, @IdRes id: Int, @IdRes startDestination: Int)

DSL for constructing a new NavGraph

Public methods
Unit

Add the destination to the NavGraphBuilder

open NavGraph

Build the NavDestination by calling Navigator.createDestination.

Unit
destination(navDestination: NavDestinationBuilder<D>)

Build and add a new destination to the NavGraphBuilder

operator Unit

Adds this destination to the NavGraphBuilder

Inherited functions
Extension functions
From androidx.navigation
Unit

Construct a new ActivityNavigator.Destination

Unit
NavGraphBuilder.navigation(@IdRes id: Int, @IdRes startDestination: Int, builder: NavGraphBuilder.() -> Unit)

Construct a nested NavGraph

From androidx.navigation.compose
Unit
NavGraphBuilder.composable(route: String, arguments: List<NamedNavArgument> = emptyList(), deepLinks: List<NavDeepLink> = emptyList(), content: (NavBackStackEntry) -> Unit)

Add the Composable to the NavGraphBuilder

Unit
NavGraphBuilder.navigation(startDestination: