ModifierLocalProvider


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.

Summary

Public properties

ProvidableModifierLocal<T>

Each ModifierLocalProvider stores a ModifierLocal instance that can be used as a key by a ModifierLocalConsumer to read the provided value.

Cmn
T

The provided value, that can be read by modifiers on the right of this modifier, and modifiers added to children of the composable using this modifier.

Cmn

Inherited functions

From androidx.compose.ui.Modifier
open infix Modifier
then(other: Modifier)

Concatenates this modifier with another.

Cmn
From androidx.compose.ui.Modifier.Element
open Boolean
all(predicate: (Modifier.Element) -> Boolean)

Returns true if predicate returns true for all Elements in this Modifier or if this Modifier contains no Elements.

Cmn
open Boolean
any(predicate: (Modifier.Element) -> Boolean)

Returns true if predicate returns true for any Element in this Modifier.

Cmn
open R
<R : Any?> foldIn(initial: R, operation: (Modifier.Element, R) -> R)

Accumulates a value starting with initial and applying operation to the current value and each element from outside in.

Cmn
open R
<R : Any?> foldOut(initial: R, operation: (Modifier.Element, R) -> R)

Accumulates a value starting with initial and applying operation to the current value and each element from inside out.

Cmn

Public properties

key

val keyProvidableModifierLocal<T>

Each ModifierLocalProvider stores a ModifierLocal instance that can be used as a key by a ModifierLocalConsumer to read the provided value.

value

val value: T

The provided value, that can be read by modifiers on the right of this modifier, and modifiers added to children of the composable using this modifier.