build method

HexagonalGrid build({
  1. dynamic onCellTap(
    1. HexCoordinate
    )?,
  2. dynamic onCellLongPress(
    1. HexCoordinate
    )?,
  3. dynamic onCellHover(
    1. HexCoordinate?
    )?,
})

构建网格并自动分配 widgets

Implementation

HexagonalGrid build({
  Function(HexCoordinate)? onCellTap,
  Function(HexCoordinate)? onCellLongPress,
  Function(HexCoordinate?)? onCellHover,
}) {
  final hexWidgets = _autoLayoutWidgets();

  return HexagonalGrid(
    config: config,
    widgets: hexWidgets,
    onCellTap: onCellTap,
    onCellLongPress: onCellLongPress,
    onCellHover: onCellHover,
  );
}