Package-level declarations

Types

Link copied to clipboard
class CombinedModifier(outer: Modifier, inner: Modifier) : Modifier

A node in a Modifier chain. A CombinedModifier always contains at least two elements; a Modifier outer that wraps around the Modifier inner.

Link copied to clipboard
@Stable
interface Modifier

An ordered, immutable collection of modifier elements that decorate or add behavior to Mosaic elements. For example, backgrounds, padding, and click event listeners decorate or add behavior to rows, text, or buttons.

Functions

Link copied to clipboard
fun Modifier.composed(factory: @Composable Modifier.() -> Modifier): Modifier
fun Modifier.composed(fullyQualifiedName: String, key1: Any?, factory: @Composable Modifier.() -> Modifier): Modifier
fun Modifier.composed(fullyQualifiedName: String, vararg keys: Any?, factory: @Composable Modifier.() -> Modifier): Modifier
fun Modifier.composed(fullyQualifiedName: String, key1: Any?, key2: Any?, factory: @Composable Modifier.() -> Modifier): Modifier
fun Modifier.composed(fullyQualifiedName: String, key1: Any?, key2: Any?, key3: Any?, factory: @Composable Modifier.() -> Modifier): Modifier

Declare a just-in-time composition of a Modifier that will be composed for each element it modifies. composed may be used to implement stateful modifiers that have instance-specific state for each modified element, allowing the same Modifier instance to be safely reused for multiple elements while maintaining element-specific state.

Link copied to clipboard
fun Composer.materialize(modifier: Modifier): Modifier

Materialize any instance-specific composed modifiers for applying to a raw tree node. Call right before setting the returned modifier on an emitted node. You almost certainly do not need to call this function directly.