---
title: "ProvidedValue"
description: "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]."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
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`.



