LineBoundary class
A TextBoundary subclass for locating closest line breaks to a given
position
.
When the given position
points to a hard line break, the returned range
is the line's content range before the hard line break, and does not contain
the given position
. For instance, the line breaks at position = 1
for
"a\nb" is [0, 1)
, which does not contain the position 1
.
- Inheritance
-
- Object
- TextBoundary
- LineBoundary
Constructors
- LineBoundary(TextLayoutMetrics _textLayout)
-
Creates a LineBoundary with the text and layout information.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getLeadingTextBoundaryAt(
int position) → int? -
Returns the offset of the closest text boundary before or at the given
position
, or null if no boundaries can be found.inherited -
getTextBoundaryAt(
int position) → TextRange -
Returns the text boundary range that encloses the input position.
override
-
getTrailingTextBoundaryAt(
int position) → int? -
Returns the offset of the closest text boundary after the given
position
, or null if there is no boundary can be found afterposition
.inherited -
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