SwitchColors


Represents the colors used by a Switch in different states

See SwitchDefaults.colors for the default implementation that follows Material specifications.

Summary

Public functions

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

Represents the color used for the switch's thumb, depending on enabled and checked.

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

Represents the color used for the switch's track, depending on enabled and checked.

Cmn

Public functions

thumbColor

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

Represents the color used for the switch's thumb, depending on enabled and checked.

Parameters
enabled: Boolean

whether the Switch is enabled or not

checked: Boolean

whether the Switch is checked or not

trackColor

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

Represents the color used for the switch's track, depending on enabled and checked.

Parameters
enabled: Boolean

whether the Switch is enabled or not

checked: Boolean

whether the Switch is checked or not