MenuItemColors
Class
Common
class MenuItemColors(
val textColor: Color,
val leadingIconColor: Color,
val trailingIconColor: Color,
val disabledTextColor: Color,
val disabledLeadingIconColor: Color,
val disabledTrailingIconColor: Color,
)
Represents the text and icon colors used in a menu item at different states.
Parameters
textColor | the text color of this DropdownMenuItemContent when enabled |
leadingIconColor | the leading icon color of this DropdownMenuItemContent when enabled |
trailingIconColor | the trailing icon color of this DropdownMenuItemContent when enabled |
disabledTextColor | the text color of this DropdownMenuItemContent when not enabled |
disabledLeadingIconColor | the leading icon color of this DropdownMenuItemContent when not enabled |
disabledTrailingIconColor | the trailing icon color of this DropdownMenuItemContent when not enabled |
Functions
fun copy(
textColor: Color = this.textColor,
leadingIconColor: Color = this.leadingIconColor,
trailingIconColor: Color = this.trailingIconColor,
disabledTextColor: Color = this.disabledTextColor,
disabledLeadingIconColor: Color = this.disabledLeadingIconColor,
disabledTrailingIconColor: Color = this.disabledTrailingIconColor,
) =
MenuItemColors(
textColor.takeOrElse { this.textColor },
leadingIconColor.takeOrElse { this.leadingIconColor },
trailingIconColor.takeOrElse { this.trailingIconColor },
disabledTextColor.takeOrElse { this.disabledTextColor },
disabledLeadingIconColor.takeOrElse { this.disabledLeadingIconColor },
disabledTrailingIconColor.takeOrElse { this.disabledTrailingIconColor },
)
Returns a copy of this MenuItemColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”