Line.fromSpans constructor

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

Creates a new line of text with the given spans.

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.fromSpans(
  Iterable<Span> spans, {
  Style style = Style.reset,
  Alignment alignment = Alignment.left,
}) : this._(
        List.unmodifiable(spans),
        style,
        alignment,
      );