Interface

RemoteModifier

An ordered, immutable collection of modifier elements for Remote Compose.

RevenueCat

RevenueCat

Add subscriptions to your apps in minutes

Ad Get started for free
Android
public sealed interface RemoteModifier

An ordered, immutable collection of modifier elements for Remote Compose.

RemoteModifier is the remote-first equivalent of androidx.compose.ui.Modifier. It is used to decorate or augment remote composables (e.g., adding padding, background, or click listeners).

Remote modifiers are designed to be encoded and evaluatable on a remote compose player.

Functions

toRecordingModifier

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun RemoteStateScope.toRecordingModifier(): RecordingModifier

foldIn

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun <R> foldIn(initial: R, operation: (R, Element) -> R): R

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

Elements wrap one another in a chain from left to right; an Element that appears to the left of another in a + expression or in operation's parameter order affects all of the elements that appear after it. foldIn may be used to accumulate a value starting from the parent or head of the modifier chain to the final wrapped child.


foldOut

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun <R> foldOut(initial: R, operation: (Element, R) -> R): R

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

Elements wrap one another in a chain from left to right; an Element that appears to the left of another in a + expression or in operation's parameter order affects all of the elements that appear after it. foldOut may be used to accumulate a value starting from the child or tail of the modifier chain up to the parent or head of the chain.


any

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun any(predicate: (Element) -> Boolean): Boolean

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


all

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
    public fun all(predicate: (Element) -> Boolean): Boolean

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


then

public infix fun then(other: RemoteModifier): RemoteModifier

Concatenates this modifier with another.

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