https://kotlinlang.org logo
#compose
Title
# compose
t

theapache64

11/30/2021, 7:04 PM
Navigation Compose + Hilt: 💉 How can I do
@AssistedInject
with Navigation Compose’s
hiltViewModel
method? More Info ➡️ stackoverflow https://stackoverflow.com/questions/70174711/how-to-do-assisted-injection-with-navigation-compose
z

zhuinden

11/30/2021, 7:15 PM
just having 2 ChildWidget in general with a SavedStateHandle would crash your app iirc, ViewModel is intended to be at a top-level ViewModelStoreOwner but not for children in it afaik
i

Ian Lake

11/30/2021, 7:25 PM
Hilt ViewModel doesn't support assisted inject in general, see the open issue: https://github.com/google/dagger/issues/2287
38 Views