get method

dynamic get({
  1. String header = '',
  2. int index = -1,
})

Gets value for header / index from the current record. The column index in the CSV record is retrieved according to header and index. If header is not set, index is used as the column index (starting from 0). If header is set, the column index will be retrieved from the set of headers provided to CsvWriter.withHeaders. If multiple headers have the same label, index can be used to distinguish amongst them (starting from 0). If no match is found, or if index is out of bounds, throws an InvalidHeaderException.

Implementation

dynamic get({String header = '', int index = -1}) => _data.get(header, index);