DfSearchableSingleSelectDropdown<T> constructor
const
DfSearchableSingleSelectDropdown<T> ({
- Key? key,
- List<
DropDownModel< initData = const [],T> > - DropDownModel<
T> ? selectedValue, - String? labelText,
- String? hintText,
- dynamic onOptionSelected(
- DropDownModel<
T> ?
- DropDownModel<
- String? validator(
- DropDownModel<
T> ?
- DropDownModel<
- Future<
List< onSearch(DropDownModel< >T> >- String searchText
- DropdownDecoration? decoration,
- SingleSelectorDecoration? selectorDecoration,
- Widget? arrowWidget,
- DropdownType dropdownType = DropdownType.expandable,
- bool disabled = false,
- bool closeDropdownOnSelection = true,
- Future<
List< ? asyncInitData,DropDownModel< >T> >
onSearch
: Function to perform a search based on user input. Returns a filtered list of dropdown options.
Implementation
const DfSearchableSingleSelectDropdown({
super.key,
super.initData = const [],
super.selectedValue,
super.labelText,
super.hintText,
super.onOptionSelected,
super.validator,
this.onSearch,
super.decoration,
this.selectorDecoration,
super.arrowWidget,
super.dropdownType = DropdownType.expandable,
super.disabled = false,
this.closeDropdownOnSelection = true,
super.asyncInitData,
}) : assert(initData.length == 0 || asyncInitData == null,
"initData and asyncInitData cannot be provided at the same time");