LocalViewModelStoreOwner

object LocalViewModelStoreOwner
kotlin.Any
   ↳ androidx.lifecycle.viewmodel.compose.LocalViewModelStoreOwner

The CompositionLocal containing the current ViewModelStoreOwner.

Summary

Public methods
infix ProvidedValue<ViewModelStoreOwner?>
provides(viewModelStoreOwner: ViewModelStoreOwner)

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

Properties
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

provides

infix fun provides(viewModelStoreOwner: ViewModelStoreOwner): ProvidedValue<ViewModelStoreOwner?>

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

Properties

current

val current: 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.