MeshagentTerminalController constructor
MeshagentTerminalController({})
Implementation
MeshagentTerminalController({
void Function(String data)? onOutput,
void Function(int width, int height, int pixelWidth, int pixelHeight)?
onResize,
int cols = 120,
int rows = 32,
}) : _onOutput = onOutput,
_onResize = onResize {
_cols = cols;
_rows = rows;
_terminal = flterm.TerminalController(
config: flterm.TerminalConfig(cols: cols, rows: rows),
);
_terminal.onOutput = (data) {
_onOutput?.call(utf8.decode(data, allowMalformed: true));
};
_terminal.onResize = (cols, rows) {
_cols = cols;
_rows = rows;
_onResize?.call(cols, rows, 0, 0);
};
_terminal.addListener(notifyListeners);
}