Bruno_
by viewModels()
creating view model manually
kotlin by viewModels()
We cannot directly create the object of the ViewModel as it would not be aware of the lifecyclerOwner.
Kulwinder Singh
val myViewModel = ViewModelProvider(this).get(MyViewModel::class.java)
why
how
A modern programming language that makes developers happier.