Grid<T>.generate constructor
Creates a new grid with the given width and height.
The grid is filled with the result of calling generator for each cell.
The width and height must be non-negative.
Implementation
factory Grid.generate(
int width,
int height,
T Function(int x, int y) generator,
) = ListGrid<T>.generate;