SavedStateRegistry.SavedStateProvider


public fun interface SavedStateRegistry.SavedStateProvider


Contributes to the saved state.

Summary

Public methods

abstract @NonNull SavedState

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

Public methods

saveState

Added in 1.0.0
abstract @NonNull SavedState saveState()

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

Returns
@NonNull SavedState

The SavedState containing the saved state.