SaveableStateHolderNavEntryDecorator



Wraps the content of a NavEntry with a SaveableStateHolder.SaveableStateProvider to ensure that calls to rememberSaveable within the content work properly and that state can be saved. Also provides the content of a NavEntry with a SavedStateRegistryOwner which can be accessed in the content with LocalSavedStateRegistryOwner.

This NavEntryDecorator is the only one that is required as saving state is considered a non-optional feature.

Summary

Public constructors

<T : Any> SaveableStateHolderNavEntryDecorator(
    saveableStateHolder: SaveableStateHolder
)
Cmn

Public constructors

SaveableStateHolderNavEntryDecorator

<T : Any> SaveableStateHolderNavEntryDecorator(
    saveableStateHolder: SaveableStateHolder
)
Parameters
saveableStateHolder: SaveableStateHolder

the SaveableStateHolder that holds the state defined with rememberSaveable. A saved state can only be restored from the SaveableStateHolder that it was saved with.