You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: