appearance

Functions summary

Modifier

A modifier that allows drawing a background, border, foreground, and shadows with a single modifier.

Cmn

Functions

Modifier.appearance

@ExperimentalFoundationStyleApi
fun Modifier.appearance(block: AppearanceScope.() -> Unit): Modifier

A modifier that allows drawing a background, border, foreground, and shadows with a single modifier. The values to use are in a callback that is invoked in the drawing phase and, if it reads mutable state, will only invalidate drawing.

If any mutable state, animations or style properties read in block change block to be called again and update the appearance.

NOTE: block can be invoked multiple times, which is why it's important for performance to minimize work done inside of it. block may also be invoked before effects.

Parameters
block: AppearanceScope.() -> Unit

the block used to determine what this modifier draws.

See also
AppearanceScope