Lukas Anda
08/01/2024, 9:16 AM@Serializable
data class ItemDetail(val id: String)
When I call: navController.navigate(ItemDetail("vghkj"))
or any other "non empty" text, it works flawlessly. But if I call it with an empty string, it crashes with this:
java.lang.IllegalArgumentException: Navigation destination that matches request NavDeepLinkRequest{ uri=<android-app://androidx.navigation/com.example.app.ui.item.detail.ItemDetail/> } cannot be found in the navigation graph ComposeNavGraph(0x0) startDestination={ComposeNavGraph(0x6482f8f) route=com.example.app.app.MainGraph startDestination={Destination(0x2d4021c) route=com.example.app.loading.LoadingRoute}}
I am suspecting it might be a bug inside the compose navigation that incorrectly serializes the route, therefore it can't find the proper "deeplink", but not sure about this. It's an edge case, but I'd like to know if I can do something (besides putting garbage data into the data class so it never becomes empty), to prevent this from happening.
Also I am on the newest compose multiplatform 1.7.0-alpha02 with navigation 2.8.0-alpha08Ivan Matkov
08/01/2024, 9:20 AM• Navigation now supports navigating with empty strings in path arguments. (Ic5dbd, b/339481310)I'll plan to do another round of merges and pickup changes from Google's 2.8.0-beta06
Lukas Anda
08/01/2024, 9:21 AMStylianos Gakis
08/01/2024, 9:47 AMsomething//1
for a pattern like something/{someString}/{someNumber}
If you pass ""
and 1
?Lukas Anda
08/01/2024, 9:48 AMIvan Matkov
08/01/2024, 10:15 AM