replaceWithClone method
Replaces the cell at x with a copy of cell.
Implementation
void replaceWithClone(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].copyFrom(cell);
}