Forum Discussion
is TwoPaneBackStackEntry composable list of routes incompatible with arguments / URI Routes?
Hello,
I am doing some tests on the SDK and have encountered a roadblock. Currently, my application uses route arguments to find item details. However, upon navigating to them, the following exception is returned:
java.lang.IllegalArgumentException: Invalid route item/4, not present in list of routes [home?, items?, item/{itemId}, ...]
I am unsure if this is a problem stemming from the fact that listOf[Routes] cannot take into account those values or if it is an error on my end. Could you please clarify?
Thank you for all your hard work!
- khalperMicrosoft
Hi tscholze and Papes96, thanks for your questions.
Unfortunately, you're right that the current implementation does not support arguments in the list of routes. While we work on a fix for this, I hope you can continue to use the original TwoPaneLayout composable to provide more flexibility.Sorry for the inconvenience and thanks for providing feedback!
- Papes96Copper ContributorI tried a lot of things but I think it may be a limitation of the library given how it handles the routes as a list.
For now I continued using the library using the twopane composable (without nav), this allows some flexibility in other places where I was sure the twopanenav wouldn't work out.
It would be nice to find a fix/workaround for this anyways.