ValueMatrix constructor

ValueMatrix(
  1. List<List<Value>> _data
)

Implementation

ValueMatrix(this._data)
    : rows = _data.length,
      cols = _data.isEmpty ? 0 : _data[0].length {
  if (_data.any((row) => row.length != cols)) {
    throw ArgumentError("All rows must have the same number of columns.");
  }
}