LocalViewModelStoreOwner

object LocalViewModelStoreOwner


The CompositionLocal containing the current ViewModelStoreOwner.

Summary

Public fields

final @Nullable ViewModelStoreOwner

Returns current composition local value for the owner or null if one has not been provided nor is one available via ViewTreeViewModelStoreOwner.get on the current LocalView.

Public methods

infix final @NonNull ProvidedValue<@NonNull ViewModelStoreOwner>
provides(@NonNull ViewModelStoreOwner viewModelStoreOwner)

Associates a LocalViewModelStoreOwner key to a value in a call to CompositionLocalProvider.

Public fields

current

@Nullable
public final @Nullable ViewModelStoreOwner current

Returns current composition local value for the owner or null if one has not been provided nor is one available via ViewTreeViewModelStoreOwner.get on the current LocalView.

Public methods

provides

@NonNull
public infix final ProvidedValue<@NonNull ViewModelStoreOwnerprovides(@NonNull ViewModelStoreOwner viewModelStoreOwner)

Associates a LocalViewModelStoreOwner key to a value in a call to CompositionLocalProvider.