hey is there a good way not using restricted API t...
# navigation-architecture-component
a
hey is there a good way not using restricted API to turn a typesafe Route into a full url string? Ive written up this function, but it is using internal APIs:
Copy code
/**
 * 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