replace method
Replaces the cell at x with cell without applying wide-cell rules.
Implementation
void replace(int x, Cell cell) {
if (x < 0 || x >= _cells.length) return;
final cachedHash = _renderHash;
if (cachedHash != null) {
final previous = _cells[x];
_renderHash =
cachedHash ^
_slotHash(x, previous.renderFingerprint) ^
_slotHash(x, cell.renderFingerprint);
}
_cells[x].dispose();
_cells[x] = cell;
}