Join Slack
Powered by
Can I pass composable function in navController.na...
# compose
a
Ankit Shah
01/05/2022, 11:06 AM
Can I pass composable function in navController.navigate(“routeName”)? If yes how can I pass it?
y
yschimke
01/05/2022, 1:54 PM
I thought navigation arguments need to be one of the supported types, like primitives or parcelables.
https://medium.com/codechai/passing-parcelable-serializable-in-jetpack-compose-navigation-bf398d851371
I'm not an expert, but expect you would need something hacky like put the composable in a shared map on the side, key with an argument you pass. But it sounds nasty saying that.
i
Ian Lake
01/05/2022, 6:27 PM
This sounds like an XY Problem
https://xyproblem.info/
- what are you actually trying to do?
➕ 1
2
Views
Open in Slack
Previous
Next