Skip to content

Instantly share code, notes, and snippets.

@k0siara
Last active August 8, 2021 08:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k0siara/d79481916152f5ff01d39fef96bff5f6 to your computer and use it in GitHub Desktop.
Save k0siara/d79481916152f5ff01d39fef96bff5f6 to your computer and use it in GitHub Desktop.
NavHostExample.kt
@Composable
fun NavHostExample() {
val navController = rememberNavController()
NavHost(navController, startDestination = "firstScreen") {
composable(route = "firstScreen") {
FirstScreen()
}
composable(route = "secondScreen") {
SecondScreen()
}
}
}
@Composable
fun FirstScreen(...) { ... }
@Composable
fun SecondScreen(...) { ... }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment