MenuItemColors


Represents the text and icon colors used in a menu item at different states.

Summary

Public constructors

MenuItemColors(
    textColor: Color,
    leadingIconColor: Color,
    trailingIconColor: Color,
    disabledTextColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingIconColor: Color
)

create an instance with arbitrary colors.

Cmn

Public functions

MenuItemColors
copy(
    textColor: Color,
    leadingIconColor: Color,
    trailingIconColor: Color,
    disabledTextColor: Color,
    disabledLeadingIconColor: Color,
    disabledTrailingIconColor: Color
)

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

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

Public properties

Color

the leading icon color of this DropdownMenuItemContent when not enabled

Cmn
Color

the text color of this DropdownMenuItemContent when not enabled

Cmn
Color

the trailing icon color of this DropdownMenuItemContent when not enabled

Cmn
Color

the leading icon color of this DropdownMenuItemContent when enabled

Cmn
Color

the text color of this DropdownMenuItemContent when enabled

Cmn
Color

the trailing icon color of this DropdownMenuItemContent when enabled

Cmn

Public constructors

MenuItemColors(
    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.

Parameters
textColor: Color

the text color of this DropdownMenuItemContent when enabled

leadingIconColor: Color

the leading icon color of this DropdownMenuItemContent when enabled

trailingIconColor: Color

the trailing icon color of this DropdownMenuItemContent when enabled

disabledTextColor: Color

the text color of this DropdownMenuItemContent when not enabled

disabledLeadingIconColor: Color

the leading icon color of this DropdownMenuItemContent when not enabled

disabledTrailingIconColor: Color

the trailing icon color of this DropdownMenuItemContent when not enabled

Public functions

copy

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”

equals

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

hashCode

open fun hashCode(): Int

Public properties

disabledLeadingIconColor

val disabledLeadingIconColorColor

the leading icon color of this DropdownMenuItemContent when not enabled

disabledTextColor

val disabledTextColorColor

the text color of this DropdownMenuItemContent when not enabled

disabledTrailingIconColor

val disabledTrailingIconColorColor

the trailing icon color of this DropdownMenuItemContent when not enabled

leadingIconColor

val leadingIconColorColor

the leading icon color of this DropdownMenuItemContent when enabled

textColor

val textColorColor

the text color of this DropdownMenuItemContent when enabled

trailingIconColor

val trailingIconColorColor

the trailing icon color of this DropdownMenuItemContent when enabled