Skip to content

Instantly share code, notes, and snippets.

@markchristopherng
Created August 22, 2022 09:11
Show Gist options
  • Save markchristopherng/76d051f3408fceb27cf5ca4ef06d27cf to your computer and use it in GitHub Desktop.
Save markchristopherng/76d051f3408fceb27cf5ca4ef06d27cf to your computer and use it in GitHub Desktop.
@Composable
fun DebugNavHost(
navController: NavHostController,
paddingValues: PaddingValues,
showSnackBar: (String) -> Job
) {
MaterialThemeScreenContent {
val leprechaunViewModel = viewModel<LeprechaunViewModel>()
val progressOverlayViewModel = viewModel<ProgressOverlayViewModel>()
NavHost(navController, startDestination = DebugScreen.Environment.route, modifier = Modifier.padding(paddingValues)) {
bottomNavGraph(navController)
settingsNavGraph(navController)
styleGuideNavGraph(navController)
}
}
fun NavGraphBuilder.bottomNavGraph(navController: NavHostController) {
composable(DebugScreen.Environment.route) { ....
fun NavGraphBuilder.settingsNavGraph(navController: NavHostController) {
composable(DebugScreen.Cipher.route) { ....
fun NavGraphBuilder.styleGuideNavGraph(navController: NavHostController) {
composable(DebugScreen.Styles.route) { ....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment