SelectPickerViewModel class

View model that manages the state of the legacy SelectPicker.

Mixed-in types

Constructors

SelectPickerViewModel()

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
listToShow List<SelectPickerItem>
Gets the list currently being displayed.
getter/setter pair
listToShowDoNotNotify List<SelectPickerItem>
Updates the list currently being displayed without notifying listeners.
no getter
originalList List<SelectPickerItem>
Gets the original unfiltered list.
getter/setter pair
originalListDoNotNotify List<SelectPickerItem>
Updates the original list without notifying listeners.
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchController TextEditingController
Controller for the search input field.
getter/setter pair
searchError String?
Current search error message.
getter/setter pair
selectedItem String
Gets the currently selected item label.
getter/setter pair
selectFirst bool
Whether to automatically select the first item.
getter/setter pair
showId bool
Whether to show the item ID.
getter/setter pair

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
dispose() → void
Discards any resources used by the object.
inherited
getHint(String hint, bool loading, String? loadingMessage) String
Determines the appropriate hint or selected value to display in the input.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
reset() → void
Resets the search state.
Filters the list based on the provided search text.
selectInitial({String? initialItem}) → void
Sets the initial selection based on the provided ID.
selectItem({required SelectPickerItem item}) → void
Selects a specific item and updates the UI label.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited