MenuItemColors

@Immutable
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

Constructors

Link copied to clipboard
constructor(textColor: Color, leadingIconColor: Color, trailingIconColor: Color, disabledTextColor: Color, disabledLeadingIconColor: Color, disabledTrailingIconColor: Color)

create an instance with arbitrary colors. See MenuDefaults.itemColors for the default colors used in a DropdownMenuItemContent.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val leadingIconColor: Color
Link copied to clipboard
val textColor: Color
Link copied to clipboard

Functions

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

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”

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