row method

List<Data?> row(
  1. int rowIndex
)

returns row at index = rowIndex

Implementation

List<Data?> row(int rowIndex) {
  if (rowIndex < 0) {
    return <Data?>[];
  }
  if (rowIndex < _maxRows) {
    if (_sheetData[rowIndex] != null) {
      return List.generate(_maxCols, (colIndex) {
        if (_sheetData[rowIndex]![colIndex] != null) {
          return _sheetData[rowIndex]![colIndex]!;
        }
        return null;
      });
    } else {
      return List.generate(_maxCols, (_) => null);
    }
  }
  return <Data?>[];
}