SwitchDefaults


object SwitchDefaults


Contains the default values used by Switch

Summary

Public functions

SwitchColors

Creates a SwitchColors that represents the different colors used in a Switch in different states.

SwitchColors
@Composable
colors(
    checkedThumbColor: Color,
    checkedTrackColor: Color,
    checkedBorderColor: Color,
    checkedIconColor: Color,
    uncheckedThumbColor: Color,
    uncheckedTrackColor: Color,
    uncheckedBorderColor: Color,
    uncheckedIconColor: Color,
    disabledCheckedThumbColor: Color,
    disabledCheckedTrackColor: Color,
    disabledCheckedBorderColor: Color,
    disabledCheckedIconColor: Color,
    disabledUncheckedThumbColor: Color,
    disabledUncheckedTrackColor: Color,
    disabledUncheckedBorderColor: Color,
    disabledUncheckedIconColor: Color
)

Creates a SwitchColors that represents the different colors used in a Switch in different states.

Public properties

Dp

Icon size to use for thumbContent

Public functions

colors

Added in 1.0.0-beta01
@Composable
fun colors(): SwitchColors

Creates a SwitchColors that represents the different colors used in a Switch in different states.

colors

@Composable
fun colors(
    checkedThumbColor: Color = Color.Unspecified,
    checkedTrackColor: Color = Color.Unspecified,
    checkedBorderColor: Color = Color.Unspecified,
    checkedIconColor: Color = Color.Unspecified,
    uncheckedThumbColor: Color = Color.Unspecified,
    uncheckedTrackColor: Color = Color.Unspecified,
    uncheckedBorderColor: Color = Color.Unspecified,
    uncheckedIconColor: Color = Color.Unspecified,
    disabledCheckedThumbColor: Color = Color.Unspecified,
    disabledCheckedTrackColor: Color = Color.Unspecified,
    disabledCheckedBorderColor: Color = Color.Unspecified,
    disabledCheckedIconColor: Color = Color.Unspecified,
    disabledUncheckedThumbColor: Color = Color.Unspecified,
    disabledUncheckedTrackColor: Color = Color.Unspecified,
    disabledUncheckedBorderColor: Color = Color.Unspecified,
    disabledUncheckedIconColor: Color = Color.Unspecified
): SwitchColors

Creates a SwitchColors that represents the different colors used in a Switch in different states.

Parameters
checkedThumbColor: Color = Color.Unspecified

the color used for the thumb when enabled and checked

checkedTrackColor: Color = Color.Unspecified

the color used for the track when enabled and checked

checkedBorderColor: Color = Color.Unspecified

the color used for the border when enabled and checked

checkedIconColor: Color = Color.Unspecified

the color used for the icon when enabled and checked

uncheckedThumbColor: Color = Color.Unspecified

the color used for the thumb when enabled and unchecked

uncheckedTrackColor: Color = Color.Unspecified

the color used for the track when enabled and unchecked

uncheckedBorderColor: Color = Color.Unspecified

the color used for the border when enabled and unchecked

uncheckedIconColor: Color = Color.Unspecified

the color used for the icon when enabled and unchecked

disabledCheckedThumbColor: Color = Color.Unspecified

the color used for the thumb when disabled and checked

disabledCheckedTrackColor: Color = Color.Unspecified

the color used for the track when disabled and checked

disabledCheckedBorderColor: Color = Color.Unspecified

the color used for the border when disabled and checked

disabledCheckedIconColor: Color = Color.Unspecified

the color used for the icon when disabled and checked

disabledUncheckedThumbColor: Color = Color.Unspecified

the color used for the thumb when disabled and unchecked

disabledUncheckedTrackColor: Color = Color.Unspecified

the color used for the track when disabled and unchecked

disabledUncheckedBorderColor: Color = Color.Unspecified

the color used for the border when disabled and unchecked

disabledUncheckedIconColor: Color = Color.Unspecified

the color used for the icon when disabled and unchecked

Public properties

IconSize

Added in 1.0.0-beta01
val IconSizeDp

Icon size to use for thumbContent