MenuItemColors
-
Cmn
class MenuItemColors
Represents the text and icon colors used in a menu item at different states.
Summary
Public constructors |
|
|---|---|
MenuItemColors(create an instance with arbitrary colors. |
Cmn
|
MenuItemColors( |
Cmn
|
Public functions |
||
|---|---|---|
MenuItemColors |
copy(Returns a copy of this MenuItemColors, optionally overriding some of the values. |
Cmn
|
MenuItemColors |
copy(Returns a copy of this MenuItemColors, optionally overriding some of the values. |
Cmn
|
open operator Boolean |
Cmn
|
|
open Int |
hashCode() |
Cmn
|
Public properties |
||
|---|---|---|
Color |
The container color of this menu item when enabled and unselected. |
Cmn
|
Color |
The container color of this menu item when not enabled |
Cmn
|
Color |
the leading icon color of this |
Cmn
|
Color |
the text color of this |
Cmn
|
Color |
The trailing content color of this menu item when not enabled. |
Cmn
|
Color |
This property is deprecated. Use disabledTrailingContentColor instead. |
Cmn
|
Color |
the leading icon color of this |
Cmn
|
Color |
The container color of this menu item when enabled and selected. |
Cmn
|
Color |
The leading icon color of this menu item when enabled and selected. |
Cmn
|
Color |
The text color of this menu item when enabled and selected. |
Cmn
|
Color |
The trailing content color of this menu item when enabled and selected. |
Cmn
|
Color |
the text color of this |
Cmn
|
Color |
The trailing content color of this menu item when enabled and unselected. |
Cmn
|
Color |
This property is deprecated. Use trailingContentColor instead. |
Cmn
|
Public constructors
MenuItemColors
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 DropdownMenuItem.
| Parameters | |
|---|---|
textColor: Color |
the text color of this |
leadingIconColor: Color |
the leading icon color of this |
trailingIconColor: Color |
the trailing icon color of this |
disabledTextColor: Color |
the text color of this |
disabledLeadingIconColor: Color |
the leading icon color of this |
disabledTrailingIconColor: Color |
the trailing icon color of this |
MenuItemColors
MenuItemColors(
textColor: Color,
leadingIconColor: Color,
trailingIconColor: Color,
disabledTextColor: Color,
disabledLeadingIconColor: Color,
disabledTrailingIconColor: Color,
containerColor: Color,
disabledContainerColor: Color,
selectedTextColor: Color,
selectedLeadingIconColor: Color,
selectedTrailingIconColor: Color,
selectedContainerColor: Color
)
Public functions
copy
fun copy(
textColor: Color = this.textColor,
leadingIconColor: Color = this.leadingIconColor,
trailingContentColor: Color = this.trailingContentColor,
disabledTextColor: Color = this.disabledTextColor,
disabledLeadingIconColor: Color = this.disabledLeadingIconColor,
disabledTrailingContentColor: Color = this.disabledTrailingContentColor
): 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”
copy
fun copy(
textColor: Color = this.textColor,
containerColor: Color = this.containerColor,
leadingIconColor: Color = this.leadingIconColor,
trailingContentColor: Color = this.trailingContentColor,
disabledTextColor: Color = this.disabledTextColor,
disabledContainerColor: Color = this.disabledContainerColor,
disabledLeadingIconColor: Color = this.disabledLeadingIconColor,
disabledTrailingContentColor: Color = this.disabledTrailingContentColor,
selectedTextColor: Color = this.selectedTextColor,
selectedContainerColor: Color = this.selectedContainerColor,
selectedLeadingIconColor: Color = this.selectedLeadingIconColor,
selectedTrailingContentColor: Color = this.selectedTrailingContentColor
): 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”
Public properties
containerColor
val containerColor: Color
The container color of this menu item when enabled and unselected.
disabledContainerColor
val disabledContainerColor: Color
The container color of this menu item when not enabled
disabledLeadingIconColor
val disabledLeadingIconColor: Color
the leading icon color of this DropdownMenuItem when not enabled
disabledTextColor
val disabledTextColor: Color
the text color of this DropdownMenuItem when not enabled
disabledTrailingContentColor
val disabledTrailingContentColor: Color
The trailing content color of this menu item when not enabled.
disabledTrailingIconColor
val disabledTrailingIconColor: Color
the trailing icon color of this DropdownMenuItem when not enabled
leadingIconColor
val leadingIconColor: Color
the leading icon color of this DropdownMenuItem when enabled and unselected / unchecked.
selectedContainerColor
val selectedContainerColor: Color
The container color of this menu item when enabled and selected.
selectedLeadingIconColor
val selectedLeadingIconColor: Color
The leading icon color of this menu item when enabled and selected.
selectedTextColor
val selectedTextColor: Color
The text color of this menu item when enabled and selected.
selectedTrailingContentColor
val selectedTrailingContentColor: Color
The trailing content color of this menu item when enabled and selected.
textColor
val textColor: Color
the text color of this DropdownMenuItem when enabled and unselected / unchecked.
trailingContentColor
val trailingContentColor: Color
The trailing content color of this menu item when enabled and unselected.
trailingIconColor
val trailingIconColor: Color
the trailing icon color of this DropdownMenuItem when enabled and unselected / unchecked.