TextSelectionToolbarAnchors class

The position information for a text selection toolbar.

Typically, a menu will attempt to position itself at primaryAnchor, and if that's not possible, then it will use secondaryAnchor instead, if it exists.

See also:

Annotations

Constructors

TextSelectionToolbarAnchors({required Offset primaryAnchor, Offset? secondaryAnchor})
Creates an instance of TextSelectionToolbarAnchors directly from the anchor points.
const
TextSelectionToolbarAnchors.fromSelection({required RenderBox renderBox, required double startGlyphHeight, required double endGlyphHeight, required List<TextSelectionPoint> selectionEndpoints})
Creates an instance of TextSelectionToolbarAnchors for some selection.
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
primaryAnchor Offset
The location that the toolbar should attempt to position itself at.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
secondaryAnchor Offset?
The fallback position that should be used if primaryAnchor doesn't work.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

getSelectionRect(RenderBox renderBox, double startGlyphHeight, double endGlyphHeight, List<TextSelectionPoint> selectionEndpoints) Rect
Returns the Rect covering the given selection in the given RenderBox in global coordinates.