table library

2D table data structure for CSV data.

CsvTable is the primary class — a mutable 2D data structure with optional column headers. Construct from raw data, maps, or parse directly from a CSV string:

final table = CsvTable.parse('name,age\nAlice,30\nBob,25');
print(table.cell(0, 0));           // Alice
print(table.cellByName(0, 'age')); // 30

Supporting types:

  • CsvRow — header-aware row with dual-mode access (row[0] or row['name']). Extends ListBase<dynamic>.
  • CsvColumn — column descriptor with analytics (inferredType, nonNullCount, uniqueCount).
  • CsvSchema / ColumnDef — schema inference and validation.

Classes

ColumnDef
Defines a single column's constraints.
CsvColumn
Describes a column in a CsvTable.
CsvRow
A single CSV row with header-aware, dual-mode access.
CsvSchema
Defines constraints for CSV table validation.
CsvTable
2D CSV data structure with headers and data rows.