Skip to content

Instantly share code, notes, and snippets.

@fvilarino
Created April 20, 2024 23:29
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 fvilarino/53463fe5ae4d82898fa7cd5303fa02ec to your computer and use it in GitHub Desktop.
Save fvilarino/53463fe5ae4d82898fa7cd5303fa02ec to your computer and use it in GitHub Desktop.
Shared Elem - Details Calling
composable(
route = "details/{url}"
) { backstackEntry ->
val encoded = backstackEntry.arguments?.getString("url") ?: error("No URL")
val url = URLDecoder.decode(encoded, "UTF-8")
DetailsScreen(
url = url,
animatedVisibilityScope = this@composable,
onClick = { navController.popBackStack() },
modifier = Modifier.fillMaxSize(),
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment