SearchableMultiSelectDropdownProvider<T> class
- Inheritance
-
- Object
- BaseDropdownProvider<
T> - SearchableMultiSelectDropdownProvider
Constructors
-
SearchableMultiSelectDropdownProvider.new({List<
DropDownModel< ? selectedValues, dynamic onOptionSelected(List<T> >DropDownModel< )?, Future<T> >List< onSearch(String searchText)?, List<DropDownModel< >T> >DropDownModel< initData = const [], String? multiSelectValidator(List<T> >DropDownModel< )?, double? selectorMaxHeight, int? displayResultsCount, bool selectedDataVisible = true, required Future<T> >List< ? asyncInitData, required BuildContext context})DropDownModel< >T> >
Properties
-
asyncInitData
→ Future<
List< ?DropDownModel< >T> > -
Future that provides the initial list of dropdown options.
finalinherited
-
asyncInitDataValue
↔ Future<
void> -
getter/setter pairinherited
-
baseSearchResults
→ List<
DropDownModel< T> > -
finalinherited
- context → BuildContext
-
finalinherited
- displayResultsCount → int?
-
final
- dropdownHeight → double
-
Gets the height of the dropdown suggestions list.
no setteroverride
-
dropdownKey
→ GlobalKey<
State< StatefulWidget> > -
finalinherited
- fieldTapOutside ↔ bool
-
getter/setter pair
-
getDropdownData
→ List<
DropDownModel< T> > -
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
-
initData
→ List<
DropDownModel< T> > -
The initial data set for the dropdown.
finalinherited
-
multiSelectValidator
→ String? Function(List<
DropDownModel< )?T> > -
final
-
onOptionSelected
→ dynamic Function(List<
DropDownModel< )?T> > -
final
-
onSearch
→ Future<
List< Function(String searchText)?DropDownModel< >T> > -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchTextController → TextEditingController
-
A controller to manage the search input text for filtering the dropdown.
finalinherited
- selectedDataVisible → bool
-
final
-
selectedValues
→ List<
DropDownModel< T> > -
final
- selectorMaxHeight → double?
-
final
- selectorTapOutside ↔ bool
-
getter/setter pair
- selectorTextEditingController → TextEditingController
-
final
- setValidationError ← String?
-
Sets the validation error message and triggers a UI update.
no getterinherited
- suggestionsExpanded ↔ bool
-
Whether the suggestions list is expanded or collapsed.
getter/setter pairinherited
- textFieldFocusNode ↔ FocusNode
-
FocusNode for managing the text field's focus state.
getter/setter pairinherited
- validationError → String?
-
no setterinherited
-
validator
→ String? Function(DropDownModel<
T> ?)? -
Validator function that checks if a dropdown selection is valid.
finalinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
clearSelection(
) → void -
closeSuggestions(
) → void -
Collapses the suggestions list in the dropdown.
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
expandSuggestions(
{Widget? selectorWidget, bool expanded = true}) → void -
Expands the suggestions list in the dropdown.
inherited
-
fieldBorderColor(
{Color? borderColor, Color? errorBorderColor}) → Color -
Returns the color to be used for the border of a form field, based on validation state.
inherited
-
getAsyncInitData(
) → Future< void> -
inherited
-
getSelectorResultsData(
List< DropDownModel< searchResults) → List<T> >DropDownModel< T> > -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
onInputChanged(
String text) → void -
Triggers an update when the input text is changed.
override
-
onSelectSuggestion(
DropDownModel< T> value) → void -
onTapOutside(
BuildContext context) → void -
onValidateField(
dynamic text) → String? -
Validates the input field for the dropdown based on its current state.
override
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
toggleSuggestionsExpanded(
{Widget? selectorWidget, bool expanded = true}) → void -
Toggles the state of the suggestions list between expanded and collapsed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateSelectorPositionIfNeeded(
{required Widget selectorWidget, bool expanded = true}) → void -
Monitors and updates the position of the dropdown selector widget if needed.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited