initialize

fun initialize(viewModelStoreOwner: ViewModelStoreOwner)

Initialize the delegated property by either restoring or storing it in the ViewModelStore of the ViewModelStoreOwner.

If the property has previously been initialized, the property will be retrieved from the store or a new instance of P will be constructed and then stored. If the property has not yet been initialized, a previously stored P will be retrieved from the store. If P cannot be retrieved an IllegalStateException will be thrown.

Parameters

viewModelStoreOwner

The owner of the store.