DataTable.cells constructor
DataTable.cells({
- required List<
DataTableCell> columns, - required List<
List< rows,DataTableCell> > - Style? headerStyle,
- Style? cellStyle,
- Color? borderColor,
- DataTableBorderStyle borderStyle = DataTableBorderStyle.normal,
- Key? key,
Creates a table with structured cells supporting spans and alignment.
Implementation
DataTable.cells({
required List<DataTableCell> columns,
required List<List<DataTableCell>> rows,
this.headerStyle,
this.cellStyle,
this.borderColor,
this.borderStyle = DataTableBorderStyle.normal,
super.key,
}) : columns = columns.map((cell) => cell.value).toList(growable: false),
rows = rows
.map((row) => row.map((cell) => cell.value).toList(growable: false))
.toList(growable: false),
_headerCells = List<DataTableCell>.unmodifiable(columns),
_cellRows = rows
.map((row) => List<DataTableCell>.unmodifiable(row))
.toList(growable: false);