- override
Override this method to control where children are placed in the grid.
During layout, the grid calls this function for each child, passing the
placementData
associated with that child as context. The returned
GridChildPlacement
is then used to determine the size and position of
that child within the grid.
Source
@override GridChildPlacement getChildPlacement(GridSpecification specification, int index, Object placementData) { final int columnCount = specification.columnOffsets.length - 1; return new GridChildPlacement( column: index % columnCount, row: index ~/ columnCount ); }