Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Could we get an official response to this feature request? Is there an idea to support SafeArgs in navigation-compose one day? Not asking for any time frames. Maybe there is no plans for statically generated args for navigation-compose at all.
jb...@google.com <jb...@google.com> #3
Please check out my implementation of the same-
Part 1-https://proandroiddev.com/safe-compose-arguments-an-improved-way-to-navigate-in-jetpack-compose-95c84722eec2
Part 2-https://proandroiddev.com/safe-compose-arguments-an-improved-way-to-navigate-in-jetpack-compose-part-2-218a6ae7a027
Github repo-https://github.com/dilrajsingh1997/safe-compose-args
Part 1-
Part 2-
Github repo-
Description
Now that we have
CreationExtras
, we offer a stateless version of severalViewModelProvider.Factory
s. While these stateless versions ensure that the factories are more flexible, if there is code that attempts the use them the same way as the old stateful factories it does not work.For compatibility, instead of breaking in this scenario, we should make CreationExtras the preferred option over the passed in state. That means we can support CreationExtras while still having the old state as a fallback incase none are provided.