Grid<E>.fromRows constructor
Each element in rows
, a column, must have the same length, and the
resulting grid will have a width equal to the number of columns, and a
height equal to the length of each column.
The grid is initialized with the elements in the rows, where the element
at index (x, y)
is rows.elementAt(y).elementAt(x)
. If the empty
element is omitted, the most common element in the rows is used, in which
case the rows must be non-empty.
Implementation
factory Grid.fromRows(
Iterable<Iterable<E>> rows, {
E? empty,
}) = ListGrid<E>.fromRows;