Isaac Udy07/16/2020, 10:53 AM
injected parameters to a class that is using
flosch07/16/2020, 10:58 AM
Isaac Udy07/16/2020, 11:10 AM
constructor, and write a custom ViewModelFactory that builds the ViewModelComponent and provides the SavedState/Navigation Handle classes into that component to be injected into the ViewModel's
constructor via the Dagger component defined in the library user's application. Does that make sense? A lot of information to dump, sorry. I can't figure out how to do something similar using Hilt.
annotation. I have an object that also needs to be available in the ViewModel, and also requires a soft reference to the activity, but I can't figure out how to mimic the SavedStateHandle's method of injection (because this appears to be tied up in final library classes in Hilt)