Skip to content

Instantly share code, notes, and snippets.

@krzdabrowski
Last active October 2, 2022 13:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save krzdabrowski/9099e837de50f1c1dace955fc1867ec3 to your computer and use it in GitHub Desktop.
@Composable
fun NavigationHost(
navController: NavHostController,
factories: Set<NavigationFactory>,
modifier: Modifier = Modifier
) {
NavHost(
navController = navController,
startDestination = NavigationDestination.Rockets.route,
modifier = modifier
) {
factories.forEach {
it.create(this)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment