set method

  1. @override
void set(
  1. int x,
  2. int y,
  3. T cell
)
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;
}