ValueMatrix constructor
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.");
}
}