LevitSelectionMixin<T> mixin

A mixin for LevitController that manages selection state.

It supports both single and multi-selection modes via allowMultiSelect.

Superclass constraints

Properties

allowMultiSelect bool
Whether specific items can be selected multiple times is controlled by the Set nature. Whether multiple different items can be selected is controlled by allowMultiSelect. Whether multiple items can be selected at once.
no setter
hashCode int
The hash code for this object.
no setterinherited
initialized bool
Whether onInit has been executed.
no setterinherited
isClosed bool
Whether the controller is in the process of closing or is closed.
no setterinherited
isDisposed bool
Whether the controller has been disposed and closed.
no setterinherited
isInitialized bool
Whether the initialization phase is complete.
no setterinherited
ownerPath String
The full owner path within the monitoring system (scopeId:registrationKey).
no setterinherited
registrationKey String?
The registration key used to identify this instance in Levit.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scope LevitScope?
The LevitScope that currently owns this controller.
no setterinherited
selectedItems LxSet<T>
The set of currently selected items.
final
selectionCount int
Returns the number of selected items.
no setter

Methods

autoDispose<T>(T object) → T
Registers an object to be automatically cleaned up when this controller is closed.
inherited
clearSelection() → void
Clears the selection.
deselect(T item) → void
Deselects an item.
didAttachToScope(LevitScope scope, {String? key}) → void
Invoked when the instance is successfully attached to its owning LevitScope.
inherited
isSelected(T item) bool
Returns true if item is selected.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onClose() → void
Callback invoked when the controller is being removed from Levit.
inherited
onInit() → void
Callback invoked after the controller is instantiated and registered.
override
select(T item) → void
Selects an item.
selectAll(Iterable<T> items) → void
Selects all items.
toggle(T item) → void
Toggles the selection state of an item.
toString() String
A string representation of this object.
inherited

Operators

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