https://kotlinlang.org logo
v

Vitor Prado

02/04/2021, 8:08 PM
hey guys.. is there a way to send an parcelable to compose navigation via
navigate("")
?
i

Ian Lake

02/04/2021, 8:27 PM
No. Here's one of the previously threads on this same question: https://kotlinlang.slack.com/archives/CJLTWPH7S/p1604053414451400
🙌 2
k

KD

02/04/2021, 9:43 PM
@Ian Lake is sending
parcelable
a good idea though 🤔 . I understand this will be similar to how things are being done in the fragment world, but the problem is solved if an
id
is passed to the
navigate()
?
i

Ian Lake

02/04/2021, 9:45 PM
k

KD

02/04/2021, 9:46 PM
exactly. never did it anyways. Always preferred to pass the least amount of data 👍 .
v

Vitor Prado

02/04/2021, 9:47 PM
I changed the code to send just the object id
👏 2
k

KD

02/04/2021, 9:47 PM
One can always take the passed
id
field and refer to local cache
1
s

Stylianos Gakis

02/26/2021, 1:22 PM
How bad is it to something like this? https://stackoverflow.com/a/65619560/9440211. At least for some sample project that has no local cache or something of that sorts, it should work as a hacky solution. But other than that, what are the reasons I would NOT want to do this for a simple screen that just renders one data object (for example a detail screen of something)?