agrosner
09/23/2024, 6:26 PM/**
* Generates a full route URL for a destination.
*
* This utilizes an internal jetpack compose typesafe navigation API.
*/
@SuppressLint("RestrictedApi")
fun Routable.fullRoute(destination: NavDestination): String {
val args = destination.arguments.mapValues { it.value.type }
val routeUrl = generateRouteWithArgs(this, args)
return routeUrl
}
(Routable is our own restriction on route class instances)
The use case is for tracking purposes id like to record its url value