Line class final

A line of text, consisting of one or more Spans.

Annotations

Constructors

Line(Iterable<String> spans, {Style style = Style.reset, Alignment alignment = Alignment.left})
Creates a new line of text with the given text content.
Line.fromSpans(Iterable<Span> spans, {Style style = Style.reset, Alignment alignment = Alignment.left})
Creates a new line of text with the given spans.

Properties

alignment Alignment
Alignment of this line of text.
final
hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
spans List<Span>
Spans that make up this line of text.
final
style Style
Style of this line of text.
final
width int
Combined width of the spans in this line.
no setter

Methods

append(Span span) Line
Returns a new line with span appended to the end.
copyWith({Iterable<Span>? spans, Style? style, Alignment? alignment}) Line
Returns a copy of this line with the given properties.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator +(Span span) Line
An alias for append.
operator ==(Object other) bool
The equality operator.
override

Constants

empty → const Line
An empty line with no spans, inheriting style and alignment.