Advitiay Anand
05/09/2023, 11:27 AMViewModel
'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 :)Pablichjenkov
05/09/2023, 12:26 PMAdvitiay Anand
05/09/2023, 2:32 PM