Selectable mixin Null safety
A mixin that can be selected by users when under a SelectionArea widget.
This object receives selection events and the value must reflect the current selection in this Selectable. The object must also notify its listener if the value ever changes.
This object is responsible for drawing the selection highlight.
In order to receive the selection event, the mixer needs to register itself to SelectionRegistrars. Use SelectionContainer.maybeOf to get the selection registrar, and mix the SelectionRegistrant to subscribe to the SelectionRegistrar automatically.
This mixin is typically mixed by RenderObjects. The RenderObject.paint methods are responsible to push the LayerLinks provided to pushHandleLayers.
This class returns a SelectionGeometry as its value, and is responsible to notify its listener when its selection geometry has changed as the result of receiving selection events.
See also:
- SelectionArea, which provides an overview of selection system.
- Implemented types
Properties
- size → Size
-
The size of this Selectable.
read-only
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- value → SelectionGeometry
-
The current value of the object. When the value changes, the callbacks
registered with addListener will be invoked.
read-onlyinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object notifies its listeners.
inherited
-
dispatchSelectionEvent(
SelectionEvent event) → SelectionResult -
Handles the SelectionEvent sent to this object.
inherited
-
dispose(
) → void - Disposes resources held by the mixer.
-
getSelectedContent(
) → SelectedContent? -
Gets the selected content in this object.
inherited
-
getTransformTo(
RenderObject? ancestor) → Matrix4 -
Applies the paint transform up the tree to
ancestor
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
pushHandleLayers(
LayerLink? startHandle, LayerLink? endHandle) → void -
Marks this handler to be responsible for pushing LeaderLayers for the
selection handles.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited