ToggleButtonColors


Represents the container and content colors used in a toggle button in different states.

See also
colors

for the default colors used in a ToggleButton.

colors

for the default colors used in a ElevatedToggleButton.

colors

for the default colors used in a FilledTonalToggleButton.

colors

for the default colors used in a OutlinedToggleButton.

Summary

Public constructors

ToggleButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    checkedContainerColor: Color,
    checkedContentColor: Color
)

create an instance with arbitrary colors.

Cmn

Public functions

ToggleButtonColors
copy(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    checkedContainerColor: Color,
    checkedContentColor: Color
)

Returns a copy of this ToggleButtonColors, optionally overriding some of the values.

Cmn
open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn

Public properties

Color

the container color of this ToggleButton when checked.

Cmn
Color

the content color of this ToggleButton when checked.

Cmn
Color

the container color of this ToggleButton when enabled.

Cmn
Color

the content color of this ToggleButton when enabled.

Cmn
Color

the container color of this ToggleButton when not enabled.

Cmn
Color

the content color of this ToggleButton when not enabled.

Cmn

Public constructors

ToggleButtonColors

ToggleButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    checkedContainerColor: Color,
    checkedContentColor: Color
)

create an instance with arbitrary colors.

Parameters
containerColor: Color

the container color of this ToggleButton when enabled.

contentColor: Color

the content color of this ToggleButton when enabled.

disabledContainerColor: Color

the container color of this ToggleButton when not enabled.

disabledContentColor: Color

the content color of this ToggleButton when not enabled.

checkedContainerColor: Color

the container color of this ToggleButton when checked.

checkedContentColor: Color

the content color of this ToggleButton when checked.

Public functions

copy

fun copy(
    containerColor: Color = this.containerColor,
    contentColor: Color = this.contentColor,
    disabledContainerColor: Color = this.disabledContainerColor,
    disabledContentColor: Color = this.disabledContentColor,
    checkedContainerColor: Color = this.checkedContainerColor,
    checkedContentColor: Color = this.checkedContentColor
): ToggleButtonColors

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

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

Public properties

checkedContainerColor

val checkedContainerColor: Color

the container color of this ToggleButton when checked.

checkedContentColor

val checkedContentColor: Color

the content color of this ToggleButton when checked.

containerColor

val containerColor: Color

the container color of this ToggleButton when enabled.

contentColor

val contentColor: Color

the content color of this ToggleButton when enabled.

disabledContainerColor

val disabledContainerColor: Color

the container color of this ToggleButton when not enabled.

disabledContentColor

val disabledContentColor: Color

the content color of this ToggleButton when not enabled.