Skip to content

Instantly share code, notes, and snippets.

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