ViewModelPropertyDelegate
This can be used to store a property of a fragment in a ViewModelStore. The property will be encapsulated in a ViewModel and stored, so that it can be retrieved upon re-creation of a fragment.
Parameters
P
The type of the property being delegated.
key
Unique identifier for P.
Functions
Link copied to clipboard
Initialize the delegated property by either restoring or storing it in the ViewModelStore of the ViewModelStoreOwner.
Link copied to clipboard
Set the initial value of the property.