Skip to content

Instantly share code, notes, and snippets.

@walnashgit
Created May 6, 2021
Embed
What would you like to do?
@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