printSpan method
Prints a span of text starting at the given x
and y
coordinates.
If maxWidth
is provided, the span will be truncated to fit within the
buffer's width, which otherwise defaults to the buffer's width if omitted.
Throws if the coordinates are out of bounds.
Implementation
void printSpan(int x, int y, Span span, {int? maxWidth}) {
print(x, y, span.content, style: span.style, maxWidth: maxWidth);
}