Ravi
02/04/2022, 4:57 PMcomposable(
"profile?caption={caption}",
arguments = listOf(navArgument("caption") {
type = NavType.StringType
nullable = true
})
) { .. }
val caption = "FirstLine\nSecondLine"
navController.navigate("profile?caption=${Uri.encode(caption)}")
java.lang.IllegalArgumentException: Navigation destination that matches request NavDeepLinkRequest{ uri=<android-app://androidx.navigation/profile?caption=FirstLine%0ASecondLine> } cannot be found in the navigation graph NavGraph(0x0) startDestination={Destination(0x78c6f587) route=Blue}
\n
present in the string navarg but after encoding its converting %0A
Ian Lake
02/04/2022, 5:07 PMRavi
02/04/2022, 5:52 PM