Skip to content

Instantly share code, notes, and snippets.

@merttoptas
Created March 22, 2023 12:20
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 merttoptas/e5b2fbdce75a9977cbf1cac854f7340a to your computer and use it in GitHub Desktop.
Save merttoptas/e5b2fbdce75a9977cbf1cac854f7340a to your computer and use it in GitHub Desktop.
fun NavGraphBuilder.settingsScreen() {
composable(
route = settingsNavigationRoute,
deepLinks = listOf(navDeepLink {
uriPattern = "example://compose/settings/{id}"
action = Intent.ACTION_VIEW
}),
arguments = listOf(
navArgument("id") {
type = NavType.StringType
defaultValue = ""
}
)
) { navBackStackEntry ->
val argument = navBackStackEntry.arguments?.getString("id")
SettingsScreen(deepLinkData = argument)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment