Skip to content

Instantly share code, notes, and snippets.

@walnashgit
Created May 6, 2021 09:56
Show Gist options
  • Save walnashgit/a93814482094419e7a91a40033a68e6f to your computer and use it in GitHub Desktop.
Save walnashgit/a93814482094419e7a91a40033a68e6f to your computer and use it in GitHub Desktop.
@Composable
fun NavigationHost(navController: NavController, viewModel: MainViewModel) {
NavHost(
navController = navController as NavHostController,
startDestination = Screens.DrawerScreens.Home.route
) {
composable(Screens.DrawerScreens.Home.route) { Home(viewModel = viewModel) }
composable(Screens.HomeScreens.Favorite.route) { Favorite(viewModel = viewModel) }
composable(Screens.HomeScreens.Notification.route) { Notification(viewModel = viewModel) }
composable(Screens.HomeScreens.MyNetwork.route) { MyNetwork(viewModel = viewModel) }
composable(Screens.DrawerScreens.Account.route) { Account(viewModel = viewModel) }
composable(Screens.DrawerScreens.Help.route) { Help(viewModel = viewModel) }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment