TextSpan class
An immutable span of styled text with optional children.
Forms a tree of styled text segments. Each span can override style from its parent. Use plainText to get the unstyled concatenation.
Constructors
Properties
-
children
→ List<
TextSpan> ? -
Child spans that inherit this span's style.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- plainText → String
-
Returns the unstyled plain-text content of this span and its descendants.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → TextStyle?
-
The text style applied to this span and inherited by children.
final
- text → String?
-
The text content of this span, or
nullif this is a container span.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
visitChildren(
void visitor(TextSpan)) → void -
Recursively visits all descendant spans, calling
visitoron each.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited