Results
Passing results between navigation keys is done in Guia using the ResultManager
API, it's type safe and stateful.
A Navigator itself is a ResultManager
backed by a stateful key/value map.
Survive state restoration
By simply marking our result as Parcelable
our result can now be saved and restored, the ResultManager
will handle that internally.
Passing data between different navigators
The ResultManager
API is public can be used to create our own:
Now we can provide this result manager as CompositionLocal
to children Composables, that can potentially be hosting different navigators.
Last updated