Compose Unstyled 2.0 is out! Check the official announcement blog ->
Interface

SubspaceModifier

An ordered, immutable collection of subspace modifier elementsSubspaceModifierNodeElement that decorate or add behavior to Subspace Compose elements.

Source set: Android
public interface SubspaceModifier

An ordered, immutable collection of subspace modifier elements that decorate or add behavior to Subspace Compose elements.

Based on androidx.compose.ui.Modifier

Functions

foldIn

public fun <R> foldIn(: R, operation: (R, SubspaceModifierNodeElement<Node>) -> R): R

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

Parameters

initial initial value for the accumulation.
operation function to apply to the current accumulated value and the next element.

foldOut

public fun <R> foldOut(: R, operation: (SubspaceModifierNodeElement<Node>, R) -> R): R

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

Parameters

initial initial value for the accumulation.
operation function to apply to the next element and the current accumulated value.

any

public fun any(predicate: (SubspaceModifierNodeElement<Node>) -> Boolean): Boolean

Returns true if predicate returns true for any SubspaceModifierNodeElement in this SubspaceModifier.

Parameters

predicate condition to evaluate for each element.

all

public fun all(predicate: (SubspaceModifierNodeElement<Node>) -> Boolean): Boolean

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

Parameters

predicate condition to evaluate for each element.

then

public infix fun then(other: SubspaceModifier): SubspaceModifier

Concatenates this modifier with another.

Returns a SubspaceModifier representing this modifier followed by other in sequence.

Parameters

other SubspaceModifier to concatenate to this one.

Last updated: