SpanRange class
A range of characters in a string of text, based on Flutter's TextRange
.
This was copied from Flutter so that attributed_text could be distributed as a Dart package, instead of a Flutter package.
Constructors
- SpanRange(int start, int end)
-
Creates a span range.
const
- SpanRange.collapsed(int offset)
-
A span range that starts and ends at offset.
const
Properties
- end → int
-
The next index after the characters in this range.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- isCollapsed → bool
-
Whether this range is empty (but still potentially placed inside the text).
no setter
- isNormalized → bool
-
Whether the start of this range precedes the end.
no setter
- isValid → bool
-
Whether this range represents a valid position in the text.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- start → int
-
The index of the first character in the range.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
textAfter(
String text) → String - The text after this range.
-
textBefore(
String text) → String - The text before this range.
-
textInside(
String text) → String - The text inside this range.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override