paint method

  1. @override
void paint(
  1. PaintingContext context,
  2. Offset offset
)
override

Paints this render object into the given context at offset.

Implementation

@override
void paint(PaintingContext context, Offset offset) {
  for (int lineIndex = 0; lineIndex < _lines.length; lineIndex++) {
    final line = _lines[lineIndex];
    for (int charIndex = 0; charIndex < line.length; charIndex++) {
      context.buffer.writeStyled(
        offset.x + charIndex,
        offset.y + lineIndex,
        line[charIndex],
        style,
      );
    }
  }
}