Skip to content

Instantly share code, notes, and snippets.

@chiragthummar
Last active August 25, 2023 12:24
Show Gist options
  • Save chiragthummar/02f23084b9fa5ce6ae19ad2614e421cd to your computer and use it in GitHub Desktop.
Save chiragthummar/02f23084b9fa5ce6ae19ad2614e421cd to your computer and use it in GitHub Desktop.
@Composable
fun HomeNavHost(
modifier: Modifier,
navController: NavHostController,
startDestination: String,
navigateTo: (route: String) -> Unit
) {
NavHost(
navController = navController, startDestination = startDestination, modifier = modifier
) {
composable(route = NavRoute.Screen1.route) {
Screen1()
}
composable(route = NavRoute.Screen2.route) {
Screen2()
}
composable(route = NavRoute.Screen3.route) {
Screen3()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment