M3ESelectionController class

Index-based multi-select state for selection surfaces.

Inheritance

Constructors

M3ESelectionController({Set<int>? initialSelected})
Creates a selection controller.

Properties

hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isSelectionMode bool
Whether any item is selected.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedCount int
Number of selected indices.
no setter
selectedIndices Set<int>
Currently selected indices (unmodifiable view).
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
allSelectedFor(int itemCount) bool?
Tristate value for a select-all control given itemCount.
clear() → void
Clears all selection.
deselect(int index) → void
Deselects index if selected.
dispose() → void
Discards any resources used by the object.
inherited
isSelected(int index) bool
Whether index is selected.
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
select(int index) → void
Selects index if not already selected.
selectAll(int itemCount) → void
Selects every index in 0..itemCount-1.
toggle(int index) bool
Toggles selection for index. Returns the new selected state.
toString() String
A string representation of this object.
inherited

Operators

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