DragTextSelection class

internal use, used to get drag direction information

Inheritance

Constructors

DragTextSelection({TextAffinity affinity = TextAffinity.downstream, int baseOffset = 0, int extentOffset = 0, bool isDirectional = false, bool first = true})
const

Properties

affinity TextAffinity
If the text range is collapsed and has more than one visual location (e.g., occurs at a line break), which of the two locations to use when painting the caret.
finalinherited
base TextPosition
The position at which the selection originates.
no setterinherited
baseOffset int
The offset at which the selection originates.
finalinherited
end int
The next index after the characters in this range.
finalinherited
extent TextPosition
The position at which the selection terminates.
no setterinherited
extentOffset int
The offset at which the selection terminates.
finalinherited
first bool
final
hashCode int
The hash code for this object.
no setterinherited
isCollapsed bool
Whether this range is empty (but still potentially placed inside the text).
no setterinherited
isDirectional bool
Whether this selection has disambiguated its base and extent.
finalinherited
isNormalized bool
Whether the start of this range precedes the end.
no setterinherited
isValid bool
Whether this range represents a valid position in the text.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
start int
The index of the first character in the range.
finalinherited

Methods

copyWith({int? baseOffset, int? extentOffset, TextAffinity? affinity, bool? isDirectional, bool? first}) DragTextSelection
Creates a new TextSelection based on the current selection, with the provided parameters overridden.
override
expandTo(TextPosition position, [bool extentAtIndex = false]) TextSelection
Returns the smallest TextSelection that this could expand to in order to include the given TextPosition.
inherited
extendTo(TextPosition position) TextSelection
Keeping the selection's TextSelection.baseOffset fixed, pivot the TextSelection.extentOffset to the given TextPosition.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
textAfter(String text) String
The text after this range.
inherited
textBefore(String text) String
The text before this range.
inherited
textInside(String text) String
The text inside this range.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited