vector / com.haroldadmin.vector / VectorViewModelProvider / get

get

fun <VM :VectorViewModel<S>, S :VectorState> get(vmClass:KClass<outVM>, stateClass:KClass<outS>, savedStateRegistryOwner:SavedStateRegistryOwner, viewModelOwner:ViewModelOwner, stateStoreContext:CoroutineContext):VM

Creates the requested ViewModel automatically using reflection, and returns it. The returned ViewModel is already registered with a ViewModelProvider

fun <VM :VectorViewModel<S>, S :VectorState> get(vmClass:KClass<outVM>, stateClass:KClass<outS>, viewModelOwner:ViewModelOwner, savedStateRegistryOwner:SavedStateRegistryOwner, viewModelProducer: (initialState:S, handle:SavedStateHandle) ->VM):VM

Creates and returns the requested ViewModel using the supplied viewModelProducer and returns it. The returned ViewModel is already registered with a ViewModelProvider