fill method

void fill(
  1. E fill, [
  2. Rect? bounds
])

Fills the grid with the given element.

If bounds is provided, only the elements within the bounds are filled.

Implementation

void fill(E fill, [Rect? bounds]) {
  if (bounds == null) {
    bounds = this.bounds;
  } else {
    bounds = bounds.intersect(this.bounds);
  }
  fillRect(bounds, setUnsafe, fill);
}