container
Creates a container scoped with ViewModelScope and allows you to used the Android ViewModel's saved state support.
Provide a SavedStateHandle in order for your Parcelable state to be automatically saved as you use the container.
Return
A Container implementation
Parameters
The initial state of the container.
The SavedStateHandle corresponding to this host. Typically retrieved from the containing ViewModel
This builder can be used to change the container's settings.
The intent to execute when the container is created, provided with the default or recreated state
Creates a container scoped with ViewModelScope.
Return
A Container implementation
Parameters
The initial state of the container.
This builder can be used to change the container's settings.
The intent to execute when the container is created
Creates a container scoped with ViewModelScope and allows you to used the Android ViewModel's saved state support.
Provide a SavedStateHandle in order for your Serializable state to be automatically saved as you use the container.
Return
A Container implementation
Parameters
The initial state of the container.
The SavedStateHandle corresponding to this host. Typically retrieved from the containing ViewModel
The KSerializer to use for serializing and deserializing state.
This builder can be used to change the container's settings.
The intent to execute when the container is created, provided with the default or recreated state