Skip to content

Instantly share code, notes, and snippets.

@mohanmanu484
Created May 28, 2024 09:53
Show Gist options
  • Save mohanmanu484/69b2cd45d823a09c371bf868158bf69d to your computer and use it in GitHub Desktop.
Save mohanmanu484/69b2cd45d823a09c371bf868158bf69d to your computer and use it in GitHub Desktop.
@Composable
fun SampleNavHost() {
val navController = rememberNavController()
NavHost(
navController = navController,
startDestination = Navigation.Login.route
) {
composable(Navigation.Login) {
val id: LoginScreenArg = it.savedStateHandle.getArgs()
// Your composable code here
navController.navigate(Navigation.BuySellScreen(pprefId = "ABCDEFGH"))
}
composable(Navigation.BuySellScreen) {
val id: BuySellScreenArg = it.savedStateHandle.getArgs()
// Your composable code here
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment