SelectionAnchor class
The render paragraph index and text selection for the start or end anchor.
- Implemented types
- Annotations
Constructors
-
SelectionAnchor(int paragraphIndex, int firstCharIndex, TextSelection textSel, List<
Rect> rects) -
const
Properties
- endIndex → int
-
Returns the index after this anchor's last character in the global
paragraph list.
no setter
- firstCharIndex → int
-
Index of the first character of this anchor's paragraph in the global
paragraph list.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- paragraphIndex → int
-
Index of this anchor's paragraph in the global paragraph list.
final
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
-
rects
→ List<
Rect> -
Rectangle(s) for the selected word. It can be more than one rectangle
if the word is wrapped across multiple lines.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- startIndex → int
-
Returns the index of this anchor's first character in the global
paragraph list.
no setter
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited - textSel → TextSelection
-
A range of text that represents the selected word in this anchor's
paragraph.
final
Methods
-
centerDistanceSquaredFromPoint(
Offset point) → double -
Returns the square of the distance from the center of the rectangle that
is closest to the given
point
. -
compareTo(
SelectionAnchor? other) → int -
Compares this object to another object.
override
-
containsPoint(
Offset? point) → bool -
Returns
true
if the selected word's rectangle(s) contain thepoint
. -
copyInflated(
double delta) → SelectionAnchor -
Returns a new SelectionAnchor with the selected word's rectangles
inflated by
delta
. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
taggedTextWithParagraphs(
List< SelectionParagraph> paragraphs, {bool end = false}) → TaggedText? - Creates and returns the TaggedText object for this anchor.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator <(
SelectionAnchor? other) → bool -
operator <=(
SelectionAnchor? other) → bool -
operator ==(
Object other) → bool -
The equality operator.
inherited
-
operator >(
SelectionAnchor? other) → bool -
operator >=(
SelectionAnchor? other) → bool