RadioButtonColors

Class

Common
class RadioButtonColors
constructor(
    val selectedColor: Color,
    val unselectedColor: Color,
    val disabledSelectedColor: Color,
    val disabledUnselectedColor: Color,
)

Represents the color used by a RadioButton in different states.

Parameters

selectedColorthe color to use for the RadioButton when selected and enabled.
unselectedColorthe color to use for the RadioButton when unselected and enabled.
disabledSelectedColorthe color to use for the RadioButton when disabled and selected.
disabledUnselectedColorthe color to use for the RadioButton when disabled and not selected.

Functions

fun copy(
        selectedColor: Color = this.selectedColor,
        unselectedColor: Color = this.unselectedColor,
        disabledSelectedColor: Color = this.disabledSelectedColor,
        disabledUnselectedColor: Color = this.disabledUnselectedColor,
    ) =
        RadioButtonColors(
            selectedColor.takeOrElse { this.selectedColor },
            unselectedColor.takeOrElse { this.unselectedColor },
            disabledSelectedColor.takeOrElse { this.disabledSelectedColor },
            disabledUnselectedColor.takeOrElse { this.disabledUnselectedColor },
        )

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