createIntMatrixWithDefault static method

List<List<int>> createIntMatrixWithDefault(
  1. int rows,
  2. int cols,
  3. int defaultValue
)

Implementation

static List<List<int>> createIntMatrixWithDefault(
    int rows, int cols, int defaultValue) {
  final grid = List<List<int>>.generate(
      rows, (i) => List<int>.generate(cols, (j) => defaultValue));
  return grid;
}