Skip to content

Instantly share code, notes, and snippets.

@k0siara
Last active Aug 8, 2021
Embed
What would you like to do?
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