copyWith method

Line copyWith(
  1. {Iterable<Span>? spans,
  2. Style? style,
  3. Alignment? alignment}
)

Returns a copy of this line with the given properties.

If no arguments are provided, the current line is returned.

Implementation

Line copyWith({
  Iterable<Span>? spans,
  Style? style,
  Alignment? alignment,
}) {
  return Line.fromSpans(
    spans ?? this.spans,
    style: style ?? this.style,
    alignment: alignment ?? this.alignment,
  );
}