TextSelection class
Range of text that is selected.
Constructors
- TextSelection({required int baseOffset, required int extentOffset})
-
Creates a selection between
baseOffsetandextentOffset.const - TextSelection.collapsed({required int offset})
-
Creates a collapsed selection at
offset.const
Properties
- baseOffset → int
-
Anchor position for this selection.
final
- end → int
-
The larger of baseOffset and extentOffset.
no setter
- extentOffset → int
-
Active edge position for this selection.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isCollapsed → bool
-
Whether this selection has no selected range.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → int
-
The smaller of baseOffset and extentOffset.
no setter
Methods
-
copyWith(
{int? baseOffset, int? extentOffset}) → TextSelection - Returns a copy with optional overrides.
-
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