Skip to content

Instantly share code, notes, and snippets.

@gabrielbmoro
Last active January 21, 2022 13:39
Show Gist options
  • Save gabrielbmoro/bd0d8aa8cc6e81b80c6417f7788b1f98 to your computer and use it in GitHub Desktop.
Save gabrielbmoro/bd0d8aa8cc6e81b80c6417f7788b1f98 to your computer and use it in GitHub Desktop.
NavGraph example - Nested graphs
@Composable
fun MainNavGraph(navController: NavHostController, firstDestination: String) {
NavHost(
navController = navController,
startDestination = firstDestination
) {
navigation(
route = ScreenRoutes.ON_BOARDING_ROUTE,
startDestination = ScreenRoutes.ON_BOARDING_WELCOME_NAVO_MESSAGE_ROUTE
) {
// composable destinations
}
navigation(
route = ScreenRoutes.DASHBOARD_ROUTE,
startDestination = ScreenRoutes.DASHBOARD_GAMES_ROUTE
) {
// composable destinations
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment