CustomDropdownMenu<T> constructor

const CustomDropdownMenu<T>({
  1. Key? key,
  2. bool enabled = true,
  3. double? width,
  4. double? menuHeight,
  5. Widget? leadingIcon,
  6. Widget? trailingIcon,
  7. Widget? label,
  8. String? hintText,
  9. Widget? selectedTrailingIcon,
  10. bool enableFilter = false,
  11. bool enableSearch = true,
  12. TextStyle? textStyle,
  13. InputDecorationTheme? inputDecorationTheme,
  14. ZeroMenuStyle? menuStyle,
  15. TextEditingController? controller,
  16. T? initialSelection,
  17. ValueChanged<T?>? onSelected,
  18. required List<ZeroDropdownMenuEntry<T>> dropdownMenuEntries,
})

Creates a const CustomDropdownMenu.

The leading and trailing icons in the text field can be customized by using leadingIcon, trailingIcon and selectedTrailingIcon properties. They are passed down to the InputDecoration properties, and will override values in the InputDecoration.prefixIcon and InputDecoration.suffixIcon.

Except leading and trailing icons, the text field can be configured by the InputDecorationTheme property. The menu can be configured by the menuStyle.

Implementation

const CustomDropdownMenu({
  super.key,
  this.enabled = true,
  this.width,
  this.menuHeight,
  this.leadingIcon,
  this.trailingIcon,
  this.label,
  this.hintText,
  this.selectedTrailingIcon,
  this.enableFilter = false,
  this.enableSearch = true,
  this.textStyle,
  this.inputDecorationTheme,
  this.menuStyle,
  this.controller,
  this.initialSelection,
  this.onSelected,
  required this.dropdownMenuEntries,
});