createViewModelFactory

inline fun <T : ViewModel> createViewModelFactory(crossinline factory: () -> T): ViewModelProvider.Factory

Creates a ViewModelProvider.Factory for a single type of ViewModel using the result of the given factory closure.