Skip to content

Instantly share code, notes, and snippets.

@callebdev
Last active September 26, 2021 00:40
Show Gist options
  • Save callebdev/f9d19541d6e7ed2099cd5850485d808b to your computer and use it in GitHub Desktop.
Save callebdev/f9d19541d6e7ed2099cd5850485d808b to your computer and use it in GitHub Desktop.
@Composable
fun NavigationGraph() {
val navController = rememberNavController()
NavHost(
navController = navController,
startDestination = "firstScreen"
) {
// Neste escopo deves declarar todos os destinos possiveis
// que o NavHost pode albergar
composable("firstScreen") {
FirstScreen(navController = navController)
}
composable("secondScreen") {
SecondScreen(navController = navController)
}
// Mais destinos
/*...*/
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment