set method
override
Sets the cell at the given x
and y
coordinates to cell
.
Throws if the coordinates are out of bounds.
Implementation
@override
void set(int x, int y, T cell) {
assert(
x >= 0 && x < width && y >= 0 && y < height,
'($x, $y) is out of bounds ($width, $height) = $cell',
);
cells[_indexOf(x, y)] = cell;
}