List<List<dynamic>> rows = const CsvToListConverter(
eol: '\n',
shouldParseNumbers: false,
).convert(fileContents);
// Row zero has the headers; discard it.
String idColumnValue = rows[1][0];
Which works if the file columns are guranteed to be in a static order.
It would be great if we could access columns values by their name:
List<List<dynamic>> rows = const CsvToListConverter(
eol: '\n',
shouldParseNumbers: false,
parseHeaders: true, // New config option
).convert(fileContents);
// Row zero had headers but was parsed and dropped.
String idColumnValue = rows[0]["id"];
The current API of accesing fields values is:
Which works if the file columns are guranteed to be in a static order.
It would be great if we could access columns values by their name: