r/mAndroidDev • @OptIn(DelicateExperimentalCompostApi::class) • Dec 01 '24

Yet Another Navigation in Compost Navigation3.

https://android-review.googlesource.com/q/navigation3
Navigation built with Compost for Compost. The artifact provides the building blocks for a Compost first Navigation solution.

Along with the building blocks, it also provides an opinionated NavDisplay that brings all the blocks together.
27 Upvotes

24 comments sorted by

View all comments

Show parent comment

3

u/Zhuinden DDD: Deprecation-Driven Development Dec 02 '24

Although it got better with the latest "type-safe" navigation update, but still passing objects isn't possible, only primitives can be passed.

Not true, you can define them as a custom NavType where you convert to both a URI and to a Bundle argument. And you need to provide the Deserializer to the sender and the receiver. But it does send the object at least.

1

u/[deleted] Dec 02 '24

I should have framed it better what I mean is "cannot pass objects by default"

you can define them as a custom NavType

oh yeah the error message (which gets thrown if custom navtype isn't defined) does say that