resize method

void resize({
  1. required int columns,
  2. required int rows,
})

Cell-grid resize. This is the authoritative size source: it creates the native binding on first call and then replays anything that arrived early.

Implementation

void resize({required int columns, required int rows}) {
  if (_disposed) return;
  _bindWithSize(columns: columns, rows: rows);
  // Coalesce no-op repeats (same dims) — a resize to the current size still
  // triggers a full FFI reflow + snapshot otherwise.
  if (columns == _lastColumns && rows == _lastRows) return;
  _lastColumns = columns;
  _lastRows = rows;
  _client?.resize(columns, rows);
}