Function

SaveableStateRegistry

Creates SaveableStateRegistry.

SaveableStateRegistry

Source set: Common
public fun SaveableStateRegistry(
    restoredValues: Map<String, List<Any?>>?,
    canBeSaved: (Any) -> Boolean,
): SaveableStateRegistry

Creates SaveableStateRegistry.

Parameters

restoredValues The map of the restored values
canBeSaved Function which returns true if the given value can be saved by the registry

SaveableStateRegistry

Source set: Common
public fun SaveableStateRegistry(
    container: SavedStateContainer,
    canBeSaved: (Any) -> Boolean,
): SaveableStateRegistry

Creates SaveableStateRegistry backed by the given SavedStateContainer.

Parameters

container The SavedStateContainer to back this SaveableStateRegistry
canBeSaved Function which returns true if the given value can be saved by the registry
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: