Android
public object SwitchDefaults
Contains the default values used by Switch.
Functions
colors
@Composable
public fun colors(
checkedThumbColor: Color = MaterialTheme.colors.secondary,
checkedTrackColor: Color = checkedThumbColor.copy(alpha = ContentAlpha.disabled),
uncheckedThumbColor: Color = MaterialTheme.colors.onSurface.copy(alpha = 0.6f),
uncheckedTrackColor: Color =
uncheckedThumbColor.copy(alpha = uncheckedThumbColor.alpha * ContentAlpha.disabled),
): SwitchColors
Creates a SwitchColors for use in a Switch.
Parameters
| checkedThumbColor | The thumb color of this Switch when enabled and checked. |
| checkedTrackColor | The track color of this Switch when enabled and checked. |
| uncheckedThumbColor | The thumb color of this Switch when enabled and unchecked. |
| uncheckedTrackColor | The track color of this Switch when enabled and unchecked. |