TextBoundary class Null safety
An interface for retrieving the logical text boundary (left-closed-right-open) at a given location in a document.
The input TextPosition points to a position between 2 code units (which
can be visually represented by the caret if the selection were to collapse
to that position). The TextPosition.affinity is used to determine which
code unit it points. For example, TextPosition(i, upstream)
points to
code unit i - 1
and TextPosition(i, downstream)
points to code unit i
.
Constructors
- TextBoundary()
-
A constant constructor to enable subclass override.
const
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
getLeadingTextBoundaryAt(
TextPosition position) → TextPosition - Returns the leading text boundary at the given location.
-
getTextBoundaryAt(
TextPosition position) → TextRange - Gets the text boundary range that encloses the input position.
-
getTrailingTextBoundaryAt(
TextPosition position) → TextPosition - Returns the trailing text boundary at the given location, exclusive.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator +(
TextBoundary other) → TextBoundary - Gets the boundary by calling the left-hand side and pipe the result to right-hand side.
-
operator ==(
Object other) → bool -
The equality operator.
inherited