PushTextPosition class Null safety
A text boundary that will push input text position forward or backward one affinity
To push a text position forward one affinity unit, this proxy converts
affinity to downstream if it is upstream; otherwise it increase the offset
by one with its affinity sets to upstream. For example,
TextPosition(1, upstream)
becomes TextPosition(1, downstream)
,
TextPosition(4, downstream)
becomes TextPosition(5, upstream)
.
See also:
- PushTextPosition.forward, a text boundary to push the input position forward.
- PushTextPosition.backward, a text boundary to push the input position backward.
- Inheritance
-
- Object
- TextBoundary
- PushTextPosition
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.
override
-
getTextBoundaryAt(
TextPosition position) → TextRange -
Gets the text boundary range that encloses the input position.
inherited
-
getTrailingTextBoundaryAt(
TextPosition position) → TextPosition -
Returns the trailing text boundary at the given location, exclusive.
override
-
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.
inherited
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- backward → const TextBoundary
-
A text boundary that pushes the input position backward.
PushTextPosition._(false)
- forward → const TextBoundary
-
A text boundary that pushes the input position forward.
PushTextPosition._(true)