by @alexstyl
✉️ Leave your feedback

← Back to Compose Navigation

LocalOwnersProvider

Component
in
Compose Navigation
. Since 2.6.0

Overview

Examples

Community Notes

Video

Provides this NavBackStackEntry as LocalViewModelStoreOwner, LocalLifecycleOwner and LocalSavedStateRegistryOwner to the content and saves the content's saveable states with the given saveableStateHolder.

@param saveableStateHolder The SaveableStateHolder that holds the saved states. The same holder should be used for all NavBackStackEntrys in the encapsulating Composable and the holder should be hoisted. @param content The content Composable

Overloads

LocalOwnersProvider

@Composable
public fun NavBackStackEntry.LocalOwnersProvider(
    saveableStateHolder: SaveableStateHolder,
    content: @Composable () -> Unit
)

Parameters

NameDescription
saveableStateHolderThe SaveableStateHolder that holds the saved states. The same holder should be used for all NavBackStackEntrys in the encapsulating Composable and the holder should be hoisted.
contentThe content Composable
Previous ComponentDialogHost
Next ComponentNavHost