insert method

void insert(
  1. int x,
  2. int y,
  3. NodeOutput? item
)

Implementation

void insert(int x, int y, NodeOutput? item) {
  if (this.height() <= y) {
    this.extendHeight(y + 1);
  }
  if (this.width() <= x) {
    this.extendWidth(x + 1);
  }
  this.s[y][x] = item;
}