LazyDataTable constructor

LazyDataTable({
  1. Key? key,
  2. required int columns,
  3. required int rows,
  4. LazyDataTableDimensions tableDimensions = const LazyDataTableDimensions(),
  5. LazyDataTableTheme tableTheme = const LazyDataTableTheme(),
  6. Widget columnHeaderBuilder(
    1. int columnIndex
    )?,
  7. Widget rowHeaderBuilder(
    1. int rowIndex
    )?,
  8. required Widget dataCellBuilder(
    1. int columnIndex,
    2. int rowIndex
    ),
  9. Widget? cornerWidget,
})

Implementation

LazyDataTable({
  Key? key,
  // Number of data columns.
  required this.columns,

  // Number of data rows.
  required this.rows,

  // Dimensions of the table elements.
  this.tableDimensions = const LazyDataTableDimensions(),

  // Theme of the table elements.
  this.tableTheme = const LazyDataTableTheme(),

  // Builder function for the column header.
  this.columnHeaderBuilder,

  // Builder function for the row header.
  this.rowHeaderBuilder,

  // Builder function for the data cell.
  required this.dataCellBuilder,

  // Corner widget.
  this.cornerWidget,
}) : super(key: key) {
  if (rowHeaderBuilder == null || columnHeaderBuilder == null) {
    assert(cornerWidget == null,
        "The corner widget is only allowed when you have both a column header and a row header.");
  }
}