SwitchDefaults

object SwitchDefaults


Contains the default values used by Switch.

Summary

Public functions

SwitchColors

SwitchColors to tint the thumb and track of the Switch according to the checked state.

SwitchColors
@Composable
colors(
    checkedThumbColor: ColorProvider,
    uncheckedThumbColor: ColorProvider,
    checkedTrackColor: ColorProvider,
    uncheckedTrackColor: ColorProvider
)

SwitchColors to tint the thumb and track of the Switch according to the checked state.

Public functions

colors

Added in 1.0.0
@Composable
fun colors(): SwitchColors

SwitchColors to tint the thumb and track of the Switch according to the checked state.

Returns
SwitchColors

a default set of SwitchColors.

colors

Added in 1.0.0
@Composable
fun colors(
    checkedThumbColor: ColorProvider,
    uncheckedThumbColor: ColorProvider,
    checkedTrackColor: ColorProvider,
    uncheckedTrackColor: ColorProvider
): SwitchColors

SwitchColors to tint the thumb and track of the Switch according to the checked state.

Parameters
checkedThumbColor: ColorProvider

the tint to apply to the thumb of the switch when it is checked

uncheckedThumbColor: ColorProvider

the tint to apply to the thumb of the switch when it is not checked

checkedTrackColor: ColorProvider

the tint to apply to the track of the switch when it is checked

uncheckedTrackColor: ColorProvider

the tint to apply to the track of the switch when it is not checked