HcSearchableDropdown<T> constructor

const HcSearchableDropdown<T>({
  1. Key? key,
  2. required List<DropdownMenuItem<T>>? items,
  3. required Function onChanged,
  4. required T? value,
  5. TextStyle? style,
  6. dynamic searchHint,
  7. dynamic hint,
  8. dynamic disabledHint,
  9. dynamic icon = const Icon(Icons.arrow_drop_down),
  10. dynamic underline,
  11. Color? iconEnabledColor,
  12. Color? iconDisabledColor,
  13. double iconSize = 24.0,
  14. bool isExpanded = false,
  15. bool isCaseSensitiveSearch = false,
  16. dynamic closeButton = "Close",
  17. bool displayClearIcon = false,
  18. Icon clearIcon = const Icon(Icons.clear),
  19. Function? onClear,
  20. Function? selectedValueWidgetFn,
  21. TextInputType keyboardType = TextInputType.text,
  22. Function? validator,
  23. dynamic label,
  24. Function? searchFn,
  25. bool multipleSelection = false,
  26. List<int> selectedItems = const [],
  27. dynamic doneButton,
  28. Function? displayItem,
  29. bool dialogBox = true,
  30. BoxConstraints? menuConstraints,
  31. bool readOnly = false,
  32. Color? menuBackgroundColor,
})

Implementation

const HcSearchableDropdown({
  Key? key,
  required this.items,
  required this.onChanged,
  required this.value,
  this.style,
  this.searchHint,
  this.hint,
  this.disabledHint,
  this.icon = const Icon(Icons.arrow_drop_down),
  this.underline,
  this.iconEnabledColor,
  this.iconDisabledColor,
  this.iconSize = 24.0,
  this.isExpanded = false,
  this.isCaseSensitiveSearch = false,
  this.closeButton = "Close",
  this.displayClearIcon = false,
  this.clearIcon = const Icon(Icons.clear),
  this.onClear,
  this.selectedValueWidgetFn,
  this.keyboardType = TextInputType.text,
  this.validator,
  this.label,
  this.searchFn,
  this.multipleSelection = false,
  this.selectedItems = const [],
  this.doneButton,
  this.displayItem,
  this.dialogBox = true,
  this.menuConstraints,
  this.readOnly = false,
  this.menuBackgroundColor,
})  : assert(items != null),
      assert(!multipleSelection || doneButton != null),
      assert(!dialogBox),
      super(key: key);