Line constructor

Line(
  1. Iterable<String> spans,
  2. {Style style = Style.reset,
  3. Alignment alignment = Alignment.left}
)

Creates a new line of text with the given text content.

Optionally, a style and alignment can be provided to set, otherwise a default style and alignment will be used by inheriting from the parent element.

Implementation

Line(
  Iterable<String> spans, {
  Style style = Style.reset,
  Alignment alignment = Alignment.left,
}) : this.fromSpans(
        spans.map((span) => Span(span, Style.none)),
        style: style,
        alignment: alignment,
      );