Looking at the Google docs for ViewModel, they show the below sample code on how to get a ViewModel:
ViewModel
val model = ViewModelProviders
Use ViewModelProvider directly instead of user ViewModelProviders.of() as mentioned in the docs.
ViewModelProvider(this).get(XViewModel::class.java)
https://developer.android.com/reference/androidx/lifecycle/ViewModelProviders