Skip to content

Instantly share code, notes, and snippets.

@krzdabrowski
Last active September 6, 2024 15:24
Show Gist options
  • Save krzdabrowski/9099e837de50f1c1dace955fc1867ec3 to your computer and use it in GitHub Desktop.
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,
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