SimpleDropdownProvider<T> class

Inheritance

Constructors

SimpleDropdownProvider.new({DropDownModel<T>? selectedValue, dynamic onOptionSelected(DropDownModel<T>)?, double? maxHeight, List<DropDownModel<T>> initData = const [], String? validator(DropDownModel<T>?)?, required Future<List<DropDownModel<T>>>? asyncInitData, required BuildContext context})

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
no setter
Gets the height of the dropdown suggestions list.
no setteroverride
finalinherited
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
maxHeight double?
final
onOptionSelected → dynamic Function(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
selectedValue DropDownModel<T>?
getter/setter pair
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
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
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.
inherited
onSelectSuggestion(DropDownModel<T> value) → 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