Package-level declarations
Properties
The CompositionLocal containing the current SavedStateHandleFactory or null
if not provided.
The CompositionLocal containing the current ViewModelStoreOwner or null
if not provided.
Functions
Returns a sentinel DefaultCreationExtrasForAndroid
for the current platform (Android). This is used to determine whether the user wants to use the default CreationExtras defined by the platform or not.
Returns the default CreationExtras for the current platform.
Returns EmptyCreationExtras for the current platform (non-Android).
Returns the nearest androidx.lifecycle.ViewModelStoreOwner that is provided via LocalViewModelStoreOwner. If it is not provided, then the androidx.lifecycle.ViewModelStoreOwner is searched in the hierarchy of Contexts. If no androidx.lifecycle.ViewModelStoreOwner is found, an IllegalStateException will be thrown.
Returns the default ViewModelStoreOwner for the current platform.
Remember a ViewModelStoreOwner in the current composition. It clears its ViewModelStoreOwner.viewModelStore when the current @Composable leaves the composition. Basically, its scope ties the lifecycle of the current composition.
Returns current composition local value for the ViewModelStoreOwner provided by LocalViewModelStoreOwner. or defaultPlatformViewModelStoreOwner if one has not been provided.
Returns an existing ViewModel or creates a new one in the given owner (usually, an Android fragment or an Android activity), defaulting to defaultViewModelStoreOwner.
Remember a ViewModelFactory that will be used to create a ViewModel.
Remember a ViewModelFactory that will be used to create a ViewModel with the given key.
Provides SavedStateHandleFactory as LocalSavedStateHandleFactory to the content.
Provides ViewModelStoreOwner as LocalViewModelStoreOwner to the content.