TextSelection class
Represents a text selection range within a string.
Constructors
- TextSelection({required int start, required int end})
-
Creates a TextSelection with the given
startandendpositions.const
Properties
- end → int
-
The end offset of the selection (exclusive).
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isValid → bool
-
Whether this selection has valid (non-negative) positions with end >= start.
no setter
- length → int
-
The number of characters in the selection.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → int
-
The start offset of the selection (inclusive).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
textInRange(
String fullText) → String -
Extracts the selected substring from
fullText. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited