Hi, people!
I'm trying to create a new app following Clean Architecture to the best of my abilities.
However, I am unable to pass lambdas to my
ViewModel
's constructor (as it is constructed using
hiltViewModel()
).
I read a bit and found that NavArguments and SavedStateHandle should be used to pass arguments in ViewModel, ideally.
Yet, that only seems to support very limited
NavArg.Type
's as well. I don't get what I am doing wrong.
Are we not supposed to pass navigation lambdas to ViewModel? Because the state that needs to trigger navigation resides inside the ViewModel only.
Please give your helpful inputs :)