Skip to content

Instantly share code, notes, and snippets.

@k0siara
Created February 11, 2022 23:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k0siara/fadd4c9c5be560800ba47fa31ae5d461 to your computer and use it in GitHub Desktop.
Save k0siara/fadd4c9c5be560800ba47fa31ae5d461 to your computer and use it in GitHub Desktop.
NavHostExampleExtraction.kt
composable(
"profile?userId={userId}",
arguments = listOf(navArgument("userId") { defaultValue = "me" })
) { backStackEntry ->
Profile(backStackEntry.arguments?.getString("userId")) { friendUserId ->
navController.navigate("profile?userId=$friendUserId")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment