SwitchColors

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

Represents the colors used by a Switch in different states

Parameters

checkedThumbColor

the color used for the thumb when enabled and checked

checkedTrackColor

the color used for the track when enabled and checked

checkedBorderColor

the color used for the border when enabled and checked

checkedIconColor

the color used for the icon when enabled and checked

uncheckedThumbColor

the color used for the thumb when enabled and unchecked

uncheckedTrackColor

the color used for the track when enabled and unchecked

uncheckedBorderColor

the color used for the border when enabled and unchecked

uncheckedIconColor

the color used for the icon when enabled and unchecked

disabledCheckedThumbColor

the color used for the thumb when disabled and checked

disabledCheckedTrackColor

the color used for the track when disabled and checked

disabledCheckedBorderColor

the color used for the border when disabled and checked

disabledCheckedIconColor

the color used for the icon when disabled and checked

disabledUncheckedThumbColor

the color used for the thumb when disabled and unchecked

disabledUncheckedTrackColor

the color used for the track when disabled and unchecked

disabledUncheckedBorderColor

the color used for the border when disabled and unchecked

disabledUncheckedIconColor

the color used for the icon when disabled and unchecked

Constructors

Link copied to clipboard
constructor(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)

create an instance with arbitrary colors. See SwitchDefaults.colors for the default implementation that follows Material specifications.

Properties

Link copied to clipboard
Link copied to clipboard
val checkedIconColor: Color
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun copy(checkedThumbColor: Color = this.checkedThumbColor, checkedTrackColor: Color = this.checkedTrackColor, checkedBorderColor: Color = this.checkedBorderColor, checkedIconColor: Color = this.checkedIconColor, uncheckedThumbColor: Color = this.uncheckedThumbColor, uncheckedTrackColor: Color = this.uncheckedTrackColor, uncheckedBorderColor: Color = this.uncheckedBorderColor, uncheckedIconColor: Color = this.uncheckedIconColor, disabledCheckedThumbColor: Color = this.disabledCheckedThumbColor, disabledCheckedTrackColor: Color = this.disabledCheckedTrackColor, disabledCheckedBorderColor: Color = this.disabledCheckedBorderColor, disabledCheckedIconColor: Color = this.disabledCheckedIconColor, disabledUncheckedThumbColor: Color = this.disabledUncheckedThumbColor, disabledUncheckedTrackColor: Color = this.disabledUncheckedTrackColor, disabledUncheckedBorderColor: Color = this.disabledUncheckedBorderColor, disabledUncheckedIconColor: Color = this.disabledUncheckedIconColor): SwitchColors

Returns a copy of this SwitchColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int