MultiSelectableController<K extends Key> class
The controller of MultiSelectable, which is used to enter/exit multi-selection mode, or select/unselect items manually.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- multiSelecting → bool
-
The flag to describe whether current is in multi-selection mode.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
selectedItems
→ Set<
K> -
The selected item keys set. Updating this set manually is not recommend.
no setter
Methods
-
attach(
BuildContext context) → void - Attaches MultiSelectable's BuildContext to this controller.
-
detach(
) → void - Detaches MultiSelectable's BuildContext from this controller.
-
dispose(
) → void -
enterMultiSelectionMode(
{Iterable< K> ? alsoSelect}) → void -
Enters multi-selection mode for items and notifies parent widget. This will also mark these
items selected if
alsoSelect
is not null. -
exitMultiSelectionMode(
{bool alsoUnselect = true}) → void -
Exits multi-selection mode for items and notifies parent widget. This will also unselect all
items when
alsoUnselect
is true. -
isSelected(
K item) → bool - Checks whether given item is marked as selected.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
select(
Iterable< K> items) → void -
Marks given items as selected, notifies parent widget, and calls
onSelectChanged
if necessary. -
toString(
) → String -
A string representation of this object.
inherited
-
unselect(
Iterable< K> items) → void -
Marks given items as unselected, notifies parent widget, and calls
onSelectChanged
if necessary. -
unselectAll(
) → void -
Marks all items as unselected, notifies parent widget, and calls
onSelectChanged
if necessary.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited