SavedStateRestorer


public fun interface SavedStateRestorer

Known direct subclasses
SavedStateRegistry

Registry for components that consume and contribute to saved state.


Restores state for a component.

Implement this interface on a SavedStateRegistry.SavedStateProvider registered via SavedStateRegistry.registerSavedStateProvider to receive restored state automatically.

The registry will invoke restoreState during the restoration phase or immediately upon registration if the state is already restored.

Summary

Public methods

abstract void

Called to restore the state of a component.

Public methods

restoreState

abstract void restoreState(SavedState savedState)

Called to restore the state of a component.

Parameters
SavedState savedState

The SavedState containing the previously saved state, or null if no state was previously saved for this component.