I have created a destination for HistoryDetail screen in my app.
composable(
route = "HistoryDetail/{webpage}",
arguments = listOf(
navArgument("webpage") {
type = NavType.StringType
}
),
) { entry ->
val text = entry.arguments?.getString("webpage") ?: ""
}
When I try to navigate to that screen by calling:
navController.navigate("HistoryDetail/http://alphaone.me/")
I'm getting illegalArgumentException with the below message.
java.lang.IllegalArgumentException: Navigation destination that matches request NavDeepLinkRequest{ uri=android-app://androidx.navigation/HistoryDetail/http://alphaone.me/ } cannot be found in the navigation graph NavGraph(0x0) startDestination={Destination(0x78c9ba0c) route=Home}
Edit:
It works if I call: navController.navigate("HistoryDetail/test").