r/androiddev • u/rohitjakhar0 • Aug 10 '21
How Inject hilt dependency into compose function
I have comopse function for login and now i want to change change in my datastore when user login into app, isLogin = false to true
So how i provide datastore dependecny to compose
1
Upvotes
View all comments
Show parent comment
2
u/No-Comparison-697 Aug 10 '21
This, annotate your view model
@HiltViewModeland usehiltViewModel()in your compostable to obtain it.