SelectionGeometry class

The geometry of the current selection.

This includes details such as the locations of the selection start and end, line height, the rects that encompass the selection, etc. This information is used for drawing selection controls for mobile platforms.

The positions in geometry are in local coordinates of the SelectionHandler or Selectable.

Mixed-in types
Annotations

Constructors

SelectionGeometry({SelectionPoint? startSelectionPoint, SelectionPoint? endSelectionPoint, List<Rect> selectionRects = const <Rect>[], required SelectionStatus status, required bool hasContent})
Creates a selection geometry object.
const

Properties

endSelectionPoint SelectionPoint?
The geometry information at the selection end.
final
hasContent bool
Whether there is any selectable content in the Selectable or SelectionHandler.
final
hashCode int
The hash code for this object.
no setteroverride
hasSelection bool
Whether there is an ongoing selection.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectionRects List<Rect>
The rects in the local coordinates of the containing Selectable that represent the selection if there is any.
final
startSelectionPoint SelectionPoint?
The geometry information at the selection start.
final
status SelectionStatus
The status of ongoing selection in the Selectable or SelectionHandler.
final

Methods

copyWith({SelectionPoint? startSelectionPoint, SelectionPoint? endSelectionPoint, List<Rect>? selectionRects, SelectionStatus? status, bool? hasContent}) SelectionGeometry
Makes a copy of this object with the given values updated.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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