IconButtonColors
Class
Common
class IconButtonColors(
val containerColor: Color,
val contentColor: Color,
val disabledContainerColor: Color,
val disabledContentColor: Color,
)
Represents the container and content colors used in an icon button in different states.
- See
IconButtonDefaults.filledIconButtonColorsandIconButtonDefaults.filledTonalIconButtonColorsfor the default colors used in aFilledIconButton. - See
IconButtonDefaults.outlinedIconButtonVibrantColorsfor the default colors used in anOutlinedIconButton.
Parameters
| containerColor | the container color of this icon button when enabled. |
| contentColor | the content color of this icon button when enabled. |
| disabledContainerColor | the container color of this icon button when not enabled. |
| disabledContentColor | the content color of this icon button when not enabled. |
Functions
fun copy(
containerColor: Color = this.containerColor,
contentColor: Color = this.contentColor,
disabledContainerColor: Color = this.disabledContainerColor,
disabledContentColor: Color = this.disabledContentColor,
) =
IconButtonColors(
containerColor.takeOrElse { this.containerColor },
contentColor.takeOrElse { this.contentColor },
disabledContainerColor.takeOrElse { this.disabledContainerColor },
disabledContentColor.takeOrElse { this.disabledContentColor },
)
Returns a copy of this IconButtonColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”
