TextNodePosition class
A logical position within a TextNode.
- Inheritance
-
- Object
- TextPosition
- TextNodePosition
- Implemented types
Constructors
- TextNodePosition({required int offset, TextAffinity affinity = TextAffinity.downstream})
-
const
- TextNodePosition.fromTextPosition(TextPosition position)
Properties
- affinity → TextAffinity
-
Disambiguates cases where the position in the string given by offset
could represent two different visual positions in the rendered text. For
example, this can happen when text is forced to wrap, or when one string
of text is rendered with multiple text directions.
finalinherited
- hashCode → int
-
The hash code for this object.
no setteroverride
- offset → int
-
The index of the character that immediately follows the position in the
string representation of the text.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{int? offset, TextAffinity? affinity}) → TextNodePosition -
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.
override