pregenFirstRow method

void pregenFirstRow()

Pre-generates the first row of grid with randomized values

Implementation

void pregenFirstRow() {
  /// Generate digit collection
  List<int> vals = [];
  for (int i = 1; i < 10; i++) {
    vals.add(i);
  }
  vals.shuffle();

  for (int c = 0; c < 9; c++) {
    _matrix![0][c].setValue(vals[c]);
    _matrix![0][c].setPrefill(true);
    _matrix![0][c].setValidity(true);
  }
}