draw method

  1. @override
  2. @nonVirtual
void draw(
  1. int x,
  2. int y,
  3. Cell cell
)
override

Draws a cell at the given x and y position.

This method is provided as a convenience for drawing a single cell, and as a default implementation for the drawBatch method, but should not be used for drawing multiple cells, as it may be less efficient.

Implementation

@override
@nonVirtual
void draw(int x, int y, Cell cell) {
  // Move the cursor to the cell position.
  moveCursorTo(x, y);

  // Write the cell's content and style.
  _writeSequences(cell.style.toSequences(), cell.symbol);

  // Reset the style to the default.
  _writeSequences(Style.reset.toSequences());
}