DropdownItemDecoration constructor

const DropdownItemDecoration({
  1. Color? backgroundColor,
  2. Color? disabledBackgroundColor,
  3. Color? selectedBackgroundColor,
  4. Color? selectedTextColor,
  5. Color? textColor,
  6. Color? disabledTextColor,
  7. Icon? selectedIcon = const Icon(Icons.check),
  8. Icon? disabledIcon,
})

Creates a new instance of DropdownItemDecoration.

backgroundColor is the background color of the dropdown item. The default value is white.

disabledBackgroundColor is the background color of the disabled dropdown item. The default value is grey.

selectedBackgroundColor is the background color of the selected dropdown item. The default value is blue.

selectedTextColor is the text color of the selected dropdown item. The default value is white.

textColor is the text color of the dropdown item. The default value is black.

disabledTextColor is the text color of the disabled dropdown item. The default value is black.

selectedIcon is the icon to display for the selected dropdown item. The default value is Icon(Icons.check).

disabledIcon is the icon to display for the disabled dropdown item.

Implementation

const DropdownItemDecoration({
  this.backgroundColor,
  this.disabledBackgroundColor,
  this.selectedBackgroundColor,
  this.selectedTextColor,
  this.textColor,
  this.disabledTextColor,
  this.selectedIcon = const Icon(Icons.check),
  this.disabledIcon,
});