Object

SwitchDefaults

Contains the default values used by Switch.

Source set: Android
public object SwitchDefaults

Contains the default values used by Switch.

Functions

colors

@Composable
public 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 the tint to apply to the thumb of the switch when it is checked
uncheckedThumbColor the tint to apply to the thumb of the switch when it is not checked
checkedTrackColor the tint to apply to the track of the switch when it is checked
uncheckedTrackColor the tint to apply to the track of the switch when it is not checked

switchColors

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
public fun switchColors(
    checkedThumbColor: ColorProvider,
    uncheckedThumbColor: ColorProvider,
    checkedTrackColor: ColorProvider,
    uncheckedTrackColor: ColorProvider,
): SwitchColors

colors

@Composable
public fun colors(): SwitchColors

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

Returns

a default set of SwitchColors.

Last updated: