DropdownState<T extends Object> class
- Inheritance
-
- Implemented types
-
Constructors
-
DropdownState({List<T> items = const [], required Future<(List<T>, Object?)> asyncSearchCallback({Map<String, dynamic>? orderBy, int? page, int? perPage, Map<String, dynamic>? searchBy})?, required Future<List<T>> syncSearchCallback(String)?, required BuildContext context, required Widget itemBuilder(BuildContext, T), required bool isMultiple, required String valueToShow(T), required List<T> previousSelectedItems, required dynamic onSelectItems(List<T>)?, required dynamic onSelectItem(T?)?, required FocusNode focusNode, required int perPage, required String? searchColumn, dynamic onClearItem()?, String? hint})
-
Methods
-
addListener(VoidCallback listener)
→ void
-
Register a closure to be called when the object changes.
inherited
-
clearAll()
→ void
-
-
closeOverlay()
→ void
-
-
dispose()
→ void
-
Discards any resources used by the object.
override
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners()
→ void
-
Call all the registered listeners.
inherited
-
onSearch(String? searchColumn, String query)
→ Future<void>
-
-
openOverlay()
→ void
-
-
removeItem(T item)
→ void
-
-
removeListener(VoidCallback listener)
→ void
-
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
selectByName(String name)
→ Future<bool>
-
Programmatically selects an item matching
name.
For async dropdowns: does a targeted API search by name first (large page),
then falls back to the already-loaded items list.
For sync dropdowns: searches the provided items list.
Returns true if an item was found and selected.
override
-
syncExternalSelectedItems(List<T> externalSelectedItems)
→ void
-
Sincronizza lo stato interno con eventuali aggiornamenti esterni
(es. selectedValues valorizzati dopo un preload asincrono).
-
toggleOverlay()
→ void
-
-
toString()
→ String
-
A string representation of this object.
inherited