SelectionController<T> class
A controller that manages selection state for selection-based widgets.
Constructors
-
SelectionController({required List<
T> options, int initialIndex = 0}) - Creates a new SelectionController.
Properties
- focusedIndex ↔ int
-
The index of the option that has keyboard focus.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
options
→ List<
T> -
The options available for selection.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selected ↔ T
-
The currently selected option value.
getter/setter pair
- selectedIndex ↔ int
-
The index of the currently selected option.
getter/setter pair
Methods
-
addListener(
void listener()) → void - Adds a listener to be notified of selection changes.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
void listener()) → void - Removes a previously registered listener.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited