HcSearchableDropdown<T> constructor
const
HcSearchableDropdown<T> ({
- Key? key,
- required List<
DropdownMenuItem< ? items,T> > - required Function onChanged,
- required T? value,
- TextStyle? style,
- dynamic searchHint,
- dynamic hint,
- dynamic disabledHint,
- dynamic icon = const Icon(Icons.arrow_drop_down),
- dynamic underline,
- Color? iconEnabledColor,
- Color? iconDisabledColor,
- double iconSize = 24.0,
- bool isExpanded = false,
- bool isCaseSensitiveSearch = false,
- dynamic closeButton = "Close",
- bool displayClearIcon = false,
- Icon clearIcon = const Icon(Icons.clear),
- Function? onClear,
- Function? selectedValueWidgetFn,
- TextInputType keyboardType = TextInputType.text,
- Function? validator,
- dynamic label,
- Function? searchFn,
- bool multipleSelection = false,
- List<
int> selectedItems = const [], - dynamic doneButton,
- Function? displayItem,
- bool dialogBox = true,
- bool readOnly = false,
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);