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

ModifierLocalProviderKt

public final class ModifierLocalProviderKt


Summary

Public methods

static final @NonNull Modifier
@ExperimentalComposeUiApi
<T extends Object> modifierLocalProvider(
    @NonNull Modifier receiver,
    @NonNull ProvidableModifierLocal<@NonNull T> key,
    @NonNull Function0<@NonNull T> value
)

A Modifier that can be used to provide ModifierLocals that can be read by other modifiers to the right of this modifier, or modifiers that are children of the layout node that this modifier is attached to.

Public methods

modifierLocalProvider

@ExperimentalComposeUiApi
public static final @NonNull Modifier <T extends Object> modifierLocalProvider(
    @NonNull Modifier receiver,
    @NonNull ProvidableModifierLocal<@NonNull T> key,
    @NonNull Function0<@NonNull T> value
)

A Modifier that can be used to provide ModifierLocals that can be read by other modifiers to the right of this modifier, or modifiers that are children of the layout node that this modifier is attached to.