AttributeSpan class
A TextAttribute applied to a range of text.
- Annotations
Constructors
- AttributeSpan(TextAttribute attribute, int start, int end)
-
Create an attribute span.
const
Properties
- attribute → TextAttribute
-
The attribute this span applies.
final
- end → int
-
End of the range of this span.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFixed → bool
-
Returns true if this span's attribute is fixed in place. I.e. shift can
not move this span.
no setter
-
props
→ List<
Object?> -
The list of properties that will be used to determine whether
two instances are equal.
no setter
- range → Range
-
Range where this span is applied.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → int
-
Size of the range of this span.
no setter
- start → int
-
Start of the range of this span.
final
- stringify → bool?
-
If set to
true
, the toString method will be overridden to output this instance's props.no setterinherited
Methods
-
collapse(
Range collapseRange) → AttributeSpan? -
Return the resulting span after deleting source text in
collapseRange
. -
copyWith(
{TextAttribute? attribute, int? start, int? end}) → AttributeSpan - Creates a copy of this attribute span with the given fields replaced with the new values.
-
isApplied(
Range textRange) → bool - Returns true if this span is applied to the full range of text.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shift(
int index, int length) → AttributeSpan -
Return the resulting span after inserting source text at
index
withlength
. -
toString(
) → String - A string representation of this object.
-
willApply(
int index) → bool -
Returns true if this span will apply to text inserted at
index
.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited