writeStyled method

  1. @override
void writeStyled(
  1. int x,
  2. int y,
  3. String char,
  4. TextStyle? style,
)
override

Writes a character at the given position with the specified style.

Implementation

@override
void writeStyled(int x, int y, String char, TextStyle? style) {
  _output.add('($x,$y):$char');
  terminal.writeToGrid(x, y, char);
  if (y >= 0 && y < _styleGrid.length && x >= 0 && x < _styleGrid[y].length) {
    _styleGrid[y][x] = style;
  }
}