ProvidableCompositionLocal


A ProvidableCompositionLocal can be used in CompositionLocalProvider to provide values.

Summary

Public functions

infix ProvidedValue<T>
provides(value: T)

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

Cmn
infix ProvidedValue<T>
providesDefault(value: T)

Associates a CompositionLocal key to a value in a call to CompositionLocalProvider if the key does not already have an associated value.

Cmn

Inherited properties

From androidx.compose.runtime.CompositionLocal
T

Return the value provided by the nearest CompositionLocalProvider component that invokes, directly or indirectly, the composable function that uses this property.

Cmn

Public functions

provides

infix fun provides(value: T): ProvidedValue<T>

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

providesDefault

infix fun providesDefault(value: T): ProvidedValue<T>

Associates a CompositionLocal key to a value in a call to CompositionLocalProvider if the key does not already have an associated value.