Composed

data class Composed(val content: @Composable (tint: Color) -> Unit) : ToolbarIcon

Caller-supplied Composable content. Use for items whose icon is a function of state (e.g. annotation color preview circle).

The renderer invokes content with the tint it would apply to a Resource icon in the item's current state (normal / selected / disabled / knocked-out), so composed icons can match the state treatment of plain ones — or ignore it for fixed-color content.

Must be side-effect free during composition.

Constructors

Link copied to clipboard
constructor(content: @Composable (tint: Color) -> Unit)

Properties

Link copied to clipboard
val content: @Composable (tint: Color) -> Unit

The composable that renders the icon, given the state tint.