createMapGrid method

Widget createMapGrid(
  1. AutonomyModel model
)

The grid displaying the map

Implementation

Widget createMapGrid(AutonomyModel model) => Stack(
  fit: StackFit.expand,
  children: [
    Container(color: Colors.white),
    Column(
      children: [
        for (final row in model.grid.reversed)
          Expanded(
            child: Row(
              children: [for (final cell in row) createCell(model, cell)],
            ),
          ),
      ],
    ),
    if (!model.snapToGrid)
      IgnorePointer(
        child: ClipRect(
          child: CustomPaint(
            willChange: true,
            painter: MapRelativePainter(model: model),
          ),
        ),
      ),
  ],
);