DfSearchableMultiSelectDropdown<T> constructor
const
DfSearchableMultiSelectDropdown<T> ({
- Key? key,
- List<
DropDownModel< ? selectedValues,T> > - Future<
List< onSearch(DropDownModel< >T> >- String searchText
- MultiSelectorDecoration? selectorDecoration,
- List<
DropDownModel< initData = const [],T> > - String? labelText,
- String? hintText,
- dynamic onOptionSelected(
- List<
DropDownModel< T> >
- List<
- String? validator(
- List<
DropDownModel< ?T> >
- List<
- DropdownDecoration? decoration,
- Widget? arrowWidget,
- DropdownType dropdownType = DropdownType.expandable,
- bool disabled = false,
- Future<
List< ? asyncInitData,DropDownModel< >T> > - bool closeOnTapOutside = true,
- int? displayResultsCount,
Constructor for DfSearchableMultiSelectDropdown.
- onOptionsSelected: Callback function triggered when options are selected.
- multiSelectValidator: Optional validation function for dropdown selection.
onSearch
: Function to perform a search based on user input. Returns a filtered list of dropdown options.selectorDecoration
: Additional custom styling for the dropdown selector.
Implementation
const DfSearchableMultiSelectDropdown({
super.key,
this.selectedValues,
this.onSearch,
this.selectorDecoration,
super.initData = const [],
super.labelText,
super.hintText,
Function(List<DropDownModel<T>>)? onOptionSelected,
String? Function(List<DropDownModel<T>>?)? validator,
super.decoration,
super.arrowWidget,
super.dropdownType = DropdownType.expandable,
super.disabled = false,
super.asyncInitData,
super.closeOnTapOutside,
this.displayResultsCount,
}) : onOptionsSelected = onOptionSelected,
multiSelectValidator = validator,
assert(initData.length == 0 || asyncInitData == null,
"initData and asyncInitData cannot be provided at the same time");