CanvasTerminal constructor
CanvasTerminal(
- int width,
- int height,
- Font font, [
- CanvasElement? canvas,
Implementation
factory CanvasTerminal(int width, int height, Font font,
[html.CanvasElement? canvas]) {
var display = Display(width, height);
// If not given a canvas, create one and add it to the page.
if (canvas == null) {
canvas = html.CanvasElement();
html.document.body!.append(canvas);
}
return CanvasTerminal._(display, font, canvas);
}