public class ProvidedValue<T>
internal constructor(
/**
* The composition local that is provided by this value. This is the left-hand side of the
* [ProvidableCompositionLocal.provides] infix operator.
*/
public val compositionLocal: CompositionLocal<T>,
value: T?,
private val explicitNull: Boolean,
internal val mutationPolicy: SnapshotMutationPolicy<T>?,
internal val state: MutableState<T>?,
internal val compute: (CompositionLocalAccessorScope.() -> T)?,
internal val isDynamic: Boolean,
)
An instance to hold a value provided by CompositionLocalProvider and is created by the ProvidableCompositionLocal.provides infix operator. If canOverride is false, the provided value will not overwrite a potentially already existing value in the scope.
This value cannot be created directly. It can only be created by using one of the provides operators of ProvidableCompositionLocal.
Properties
value
public val value: T
The value provided by the ProvidableCompositionLocal.provides infix operator. This is the right-hand side of the operator.
canOverride
public var canOverride: Boolean
This value is true if the provided value will override any value provided above it. This value is true when using ProvidableCompositionLocal.provides but false when using ProvidableCompositionLocal.providesDefault.