Modifier

@ObjCName(name = "Modifier", exact = true)
interface Modifier

An ordered, immutable collection of elements that change how a widget is laid out.

Inheritors

Types

Link copied to clipboard
@ObjCName(name = "EmptyModifier", exact = true)
object Companion : Modifier

The companion object Modifier is the empty, default, or starter Modifier that contains no elements. Use it to create a new Modifier using modifier extension factory functions or as the default value for Modifier parameters.

Link copied to clipboard
sealed interface Element : Modifier

A single element contained within a Modifier chain.

Link copied to clipboard

An Element whose usage is scoped to a parent widget.

Link copied to clipboard

An Element whose usage is available on any widget.

Functions

Link copied to clipboard
abstract fun forEach(block: (Modifier.Element) -> Unit)

Iterates over all Elements in this Modifier.

Link copied to clipboard
abstract fun forEachScoped(block: (Modifier.ScopedElement) -> Unit)

Iterates over all ScopedElements in this Modifier.

Link copied to clipboard

Iterates over all UnscopedElements in this Modifier.

Link copied to clipboard
open infix fun then(other: Modifier): Modifier

Concatenates this modifier with another.