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

ProvidableModifierLocal

kotlin.Any
   ↳ androidx.compose.ui.modifier.ModifierLocal
     ↳ androidx.compose.ui.modifier.ProvidableModifierLocal

ProvidableModifierLocals are ModifierLocals that can be used to provide values using a ModifierLocalProvider.

When you create an instance of a ProvidableModifierLocal, and want to prevent users of your library from providing new values but want to allow the values to be consumed, expose a ModifierLocal instead.

See also
ModifierLocal
modifierLocalOf
modifierLocalProvider
modifierLocalConsumer

Summary

Public constructors

<T : Any?> ProvidableModifierLocal(defaultFactory: () -> T)
Cmn

Public constructors

ProvidableModifierLocal

<T : Any?> ProvidableModifierLocal(defaultFactory: () -> T)