rows property

List<List<Data?>> get rows

returns 2-D dynamic List of the sheet elements

Implementation

List<List<Data?>> get rows {
  var _data = <List<Data?>>[];

  if (_sheetData.isEmpty) {
    return _data;
  }

  if (_maxRows > 0 && maxCols > 0) {
    _data = List.generate(_maxRows, (rowIndex) {
      return List.generate(_maxCols, (colIndex) {
        if (_sheetData[rowIndex] != null &&
            _sheetData[rowIndex]![colIndex] != null) {
          return _sheetData[rowIndex]![colIndex];
        }
        return null;
      });
    });
  }

  return _data;
}