HexagonOffsetGrid.evenFlat constructor
HexagonOffsetGrid.evenFlat({
- required int columns,
- required int rows,
- Color? color,
- EdgeInsets? padding,
- HexagonWidgetBuilder? buildTile()?,
- Widget buildChild()?,
- HexagonWidgetBuilder? hexagonBuilder,
Grid of flat hexagons with even columns starting with tile and odd with a space.
columns - Required positive integer. Count of columns in grid.
rows - Required positive integer. Count of rows in grid.
color - Background color of this grid.
padding - Grid padding.
hexagonBuilder - Used as template for tiles. Will be overridden by buildTile.
buildTile - Provide a HexagonWidgetBuilder that will be used to create given tile (at col,row). Return null to use default hexagonBuilder.
buildChild - Provide a Widget to be used in a HexagonWidget for given tile (col,row). Any returned value will override child provided in buildTile or hexagonBuilder.
Implementation
HexagonOffsetGrid.evenFlat({
required this.columns,
required this.rows,
this.color,
this.padding,
this.buildTile,
this.buildChild,
this.hexagonBuilder,
}) : this.hexType = HexagonType.FLAT,
this.gridType = GridType.EVEN;