vector / com.haroldadmin.vector / VectorViewModelProvider / get
get¶
fun <VM :
VectorViewModel
<
S
>, S :
VectorState
> get(vmClass:
KClass
<out
VM
>, stateClass:
KClass
<out
S
>, 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
<out
VM
>, stateClass:
KClass
<out
S
>, 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