1 min readMay 20, 2020
This is a great question. The next frontier for using this ViewModel pattern with the AbstractSavedStateViewModelFactory
, as you mention is injecting the ViewModel entirely.
AssistedInject seems to be a promising method of injecting the ViewModel with Dagger. AssistedInject is on my personal learning roadmap so stay tuned for more in the future.
Manuel Vivo has been publishing good content surrounding Dagger, and it seems like improvements to Dagger for Android are coming. I’d imagine a a simplified approach to injecting ViewModel’s to be a part of those updates.