DataTable.cells constructor

DataTable.cells({
  1. required List<DataTableCell> columns,
  2. required List<List<DataTableCell>> rows,
  3. Style? headerStyle,
  4. Style? cellStyle,
  5. Color? borderColor,
  6. DataTableBorderStyle borderStyle = DataTableBorderStyle.normal,
  7. 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);