SelectionEngine<T> class
Internal selection engine.
Responsible for all selection logic.
The widget should never implement selection logic directly. Instead, delegate all operations to this engine.
Constructors
-
SelectionEngine({required DynamicButtonController<
T> controller, required SelectionMode selectionMode}) -
const
Properties
-
controller
→ DynamicButtonController<
T> -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasSelection → bool
-
Whether anything is selected.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selectedItem → T?
-
Returns the first selected item.
no setter
-
selectedItems
→ List<
T> -
Returns the selected items.
no setter
- selectionMode → SelectionMode
-
final
Methods
-
clear(
) → void - Clears the selection.
-
invertSelection(
List< T> items) → void - Inverts the current selection.
-
isSelected(
T item) → bool - Returns whether the item is selected.
-
isSelectedAt(
List< T> items, int index) → bool - Returns whether the index is selected.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onItemTap(
T item) → void - Handles tapping an item.
-
selectAll(
List< T> items) → void - Select all items.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited