{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

ProvidedValue

public final class ProvidedValue<T extends Object>


An instance to hold a value provided by CompositionLocalProvider and is created by the ProvidableCompositionLocal.provides infixed operator. If canOverride is false, the provided value will not overwrite a potentially already existing value in the scope.

Summary

Public methods

final boolean
final @NonNull CompositionLocal<@NonNull T>
final @NonNull T

Public methods

getCanOverride

public final boolean getCanOverride()

getCompositionLocal

public final @NonNull CompositionLocal<@NonNull T> getCompositionLocal()

getValue

public final @NonNullgetValue()