CanvasBuffer constructor
Creates a CanvasBuffer with the specified width
and height
.
Initializes the internal buffer with empty spaces.
Implementation
CanvasBuffer({required this.width, required this.height})
: _screenBuffer = List.generate(
height,
(_) => List.filled(width, BufferCell(char: ' ')),
),
_previousFrame = List.generate(
height,
(_) => List.filled(width, BufferCell(char: '')),
);