SavedStateRegistry.SavedStateProvider

public fun interface SavedStateRegistry.SavedStateProvider


This interface marks a component that contributes to saved state.

Summary

Public methods

abstract @NonNull Bundle

Called to retrieve a state from a component before being killed so later the state can be received from consumeRestoredStateForKey

Public methods

saveState

Added in 1.0.0
abstract @NonNull Bundle saveState()

Called to retrieve a state from a component before being killed so later the state can be received from consumeRestoredStateForKey

Returns S with your saved state.