SwitchColors


interface SwitchColors


Represents the content colors used in Switch in different states.

Summary

Public functions

State<Color>
@Composable
thumbColor(enabled: Boolean, checked: Boolean)

Represents the thumb color for this Switch, depending on the enabled and checked properties.

State<Color>
@Composable
trackColor(enabled: Boolean, checked: Boolean)

Represents the track color for this Switch, depending on the enabled and checked properties.

Public functions

thumbColor

Added in 1.1.0
@Composable
fun thumbColor(enabled: Boolean, checked: Boolean): State<Color>

Represents the thumb color for this Switch, depending on the enabled and checked properties.

Parameters
enabled: Boolean

Whether the Switch is enabled

checked: Boolean

Whether the Switch is currently checked or unchecked

trackColor

Added in 1.1.0
@Composable
fun trackColor(enabled: Boolean, checked: Boolean): State<Color>

Represents the track color for this Switch, depending on the enabled and checked properties.

Parameters
enabled: Boolean

Whether the Switch is enabled

checked: Boolean

Whether the Switch is currently checked or unchecked