getZoneIndexes static method

List<int> getZoneIndexes({
  1. int zone = 0,
})

Implementation

static List<int> getZoneIndexes({int zone = 0}) {
  List<int> indexes = [];

  // cols
  [0, 1, 2].forEach((col) {
    // rows
    [0, 1, 2].forEach((row) {
      indexes.add(((col + zone ~/ 3 * 3) * 9) + (row + (zone % 3) * 3));
    });
  });

  return indexes;
}