Selected

fun Selected(selected: Boolean = true): PainterHint

Selects the "selected" variant of an image when selected is true. If an image does not have a selected variant, the base version will be used.

Base image nameSelected image name
my-icon.pngmy-iconSelected.png
myIcon@20x20.svgmyIconSelected@20x20.svg
my-icon@2x_dark.pngmy-iconSelected@2x_dark.png

fun Selected(state: SelectableComponentState): PainterHint