MultiSelectController<T> class
Controller for the multiselect dropdown.
- Inheritance
-
- Object
- ChangeNotifier
- MultiSelectController
Constructors
Properties
-
disabledItems
→ List<
DropdownItem< T> > -
Gets the list of disabled dropdown items.
no setter
- hashCode → int
-
The hash code for this object.
no setteroverride
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- isDisposed → bool
-
Gets whether the controller is disposed.
no setter
- isOpen → bool
-
Gets whether the dropdown is open.
no setter
-
items
→ List<
DropdownItem< T> > -
Gets the list of dropdown items.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectedItems
→ List<
DropdownItem< T> > -
Gets the list of selected dropdown items.
no setter
Methods
-
addItem(
DropdownItem< T> option, {int index = -1}) → void -
Adds a dropdown item to the list of dropdown items.
The
indexparameter is optional, and if provided, the item will be inserted at the specified index. -
addItems(
List< DropdownItem< options) → voidT> > - Adds a list of dropdown items to the list of dropdown items.
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
clearAll(
) → void - clears all the selected items.
-
closeDropdown(
) → void - hides the dropdown, if it is not already closed.
-
disableWhere(
bool predicate(DropdownItem< T> item)) → void - disables the items that satisfy the predicate.
-
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).
override
-
itemIsSelected(
DropdownItem< T> item) → bool -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
openDropdown(
) → void - shows the dropdown, if it is not already open.
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
selectAll(
) → void - selects all the items.
-
selectAtIndex(
int index) → void - select the item at the specified index.
-
selectWhere(
bool predicate(DropdownItem< T> item)) → void - selects the items that satisfy the predicate.
-
setItems(
List< DropdownItem< options) → voidT> > - sets the list of dropdown items. It replaces the existing list of dropdown items.
-
toggleWhere(
bool predicate(DropdownItem< T> item)) → void - deselects all the items.
-
toString(
) → String -
A string representation of this object.
override
-
unselectWhere(
bool predicate(DropdownItem< T> item)) → void - unselects the items that satisfy the predicate.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override