convertRow method

List<String>? convertRow(
  1. String csv
)

Parses single CSV row csv

If the row spans multiple lines, returns null.

Throws if the row is invalid!

parser.convertRow('Name,'Age',House');  // => [Name, Age, House]

Implementation

List<String>? convertRow(String csv) {
  final ret = parseRow(csv, fs: fieldSep, ts: textSep);

  if (ret == null) {
    throw Exception('invalid row');
  }

  return ret;
}