SwitchDefaults
object SwitchDefaults
Contains the default values used by Switch.
Summary
Public functions |
|
|---|---|
SwitchColors |
@ComposableCreates a |
Public functions
colors
Added in 1.6.0-alpha06
@Composable
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: Color = MaterialTheme.colors.secondary |
The thumb color of this |
checkedTrackColor: Color = checkedThumbColor.copy(alpha = ContentAlpha.disabled) |
The track color of this |
uncheckedThumbColor: Color = MaterialTheme.colors.onSurface.copy(alpha = 0.6f) |
The thumb color of this |
uncheckedTrackColor: Color = uncheckedThumbColor.copy(alpha = uncheckedThumbColor.alpha * ContentAlpha.disabled) |
The track color of this |