ViewModelDelegate
Class to be used as a delegate to a ViewModel which can be stored and retrieved in a ViewModelStore.
Parameters
VM
The type of the view model being delegated.
key
Unique identifier for this ViewModel.
Functions
Link copied to clipboard
fun <O : ViewModelStoreOwner, HasDefaultViewModelProviderFactory> initialize(viewModelStoreOwner: O, viewModelClass: KClass<VM>, factoryAvailable: Boolean)
Initialize the delegated view model by either restoring or storing it in the ViewModelStore of the ViewModelStoreOwner.