columns property
Columns of the grid.
An iterable of columns, where each column is an iterable representing the rows of that particular column, in the order they appear in the grid; the first column is the left-most column, and the last column is the right- most column.
Example
final grid = Grid.fromRows(
[
[Tile.wall, Tile.wall, Tile.wall],
[Tile.wall, Tile.floor, Tile.wall],
],
fill: Tile.wall,
);
print(grid.columns.first); // [Tile.wall, Tile.wall]
print(grid.columns.last); // [Tile.wall, Tile.wall]
Implementation
Iterable<Iterable<E>> get columns => _Columns(this);