Created
March 26, 2021 18:19
-
-
Save viniciusalvesmello/fd90023abb064d522fdf62a647cf0464 to your computer and use it in GitHub Desktop.
Intância ViewModel com Dagger Hilt sem a Fragment KTX
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@AndroidEntryPoint | |
class MyFragment : Fragment() { | |
... | |
private val viewModel: MyViewModel by lazy { | |
ViewModelProvider(this).get(MyViewModel.class) | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment