parse static method
Parses CSV / TSV / DSV / JSON text content into a list of row cells: List<List<String>>.
Row 0 is headers, remaining rows are data records.
Implementation
static List<List<String>> parse(String content, {String? delimiter}) {
if (isJson(content)) {
final res = parseGeneric(content);
if (res.headers.isEmpty && res.rows.isEmpty) return [];
return [res.headers, ...res.rows];
}
return parseDelimited(content, delimiter: delimiter);
}