For that purpose, we’ll use hilt gradle plugin. Like any framework we write less with hilt because most of the code is generated for us. We’ll see it end to end in the following section. And there are few improvements on creating viewmodel for the fragment. Depends on the viewmodel’s scope (activity / fragment) let my dependency live (ViewModelScope)įor our use-case, we’ll inject DataRepository to the viewmodel using hilt.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |