RetainedStateRegistry
Allows components to save and restore their state using the onRetainNonConfigurationInstance
mechanism.
Inheritors
Types
Link copied to clipboard
interface Entry
The registry entry which you get when you use registerValue.
Functions
Link copied to clipboard
Returns the restored value for the given key. Once being restored the value is cleared, so you can't restore the same key twice.
Link copied to clipboard
Releases all currently unconsumed values. Useful as a GC mechanism for the registry.
Link copied to clipboard
abstract fun registerValue(key: String, valueProvider: RetainedValueProvider): RetainedStateRegistry.Entry
Registers the value provider.