CsvLoader.withHeaders constructor
CsvLoader.withHeaders(})
Builds a new CsvLoader bound to stream
. The first non-empty line from the CSV data source will
be used to populate the CsvData.headers; headers are not provided in the rows stream. separator
(default is ','
) and endOfLine (default is '\r\n'
) can be overriden. Using this constructor,
data may be read by header name and/or index.
Implementation
CsvLoader.withHeaders(Stream<String> stream,
{Encoding encoding = utf8,
this.separator = _defSeparator,
this.endOfLine = _defEndOfLine})
: hasHeaders = true {
_processor = CsvProcessor(stream, separator, endOfLine, hasHeaders);
}