SavedStateValue



Interface representing a saved state component holding a value.

A SavedStateValue combines state saving (SavedStateProvider) and restoration (SavedStateRestorer) with direct access to the underlying value.

Parameters
<T : Any?>

type of the underlying value

Summary

Public properties

T

The current value held by this saved state component.

Cmn

Inherited functions

From androidx.savedstate.SavedStateRegistry.SavedStateProvider
SavedState

Called to retrieve the state from a component before it is killed so the state can be retrieved later from consumeRestoredStateForKey.

Cmn
From androidx.savedstate.SavedStateRegistry.SavedStateRestorer
Unit
restoreState(savedState: SavedState?)

Called to restore the state of a component.

Cmn

Public properties

value

val value: T

The current value held by this saved state component.