toObject method

FluxRecord toObject(
  1. List values
)

Implementation

FluxRecord toObject(List<dynamic> values) {
  var record = FluxRecord(tableIndex);
  // record.table = tableIndex;

  for (var column in columns) {
    var columnName = column.label;
    var index = column.index + 1;
    ////
    if (index >= values.length) {
      throw FluxCsvParserException(
          'Invalid data $values - columns: $columns');
    }
    var csvValue = values[index];
    record[columnName] = _toValue(csvValue, column);
    record.row.add(csvValue);
  }

  return record;
}