TreeDataTable.eager constructor

const TreeDataTable.eager({
  1. Key? key,
  2. bool headerPinned = true,
  3. double headerMinExtent = 51,
  4. double headerMaxExtent = 51,
  5. required List<HeaderRow> headerRows,
  6. required TreeDataTableEagerDataSource dataSource,
  7. String? persistColumnStateId,
  8. bool scaleColumnsToFit = false,
  9. TreeDataTableRowSelectionMode rowSelectionMode = TreeDataTableRowSelectionMode.none,
  10. Set<Object>? selectedRowIds,
  11. Set<Object> initialSelectedRowIds = const <Object>{},
  12. TreeDataTableRowSelectionChanged? onRowSelectionChanged,
  13. bool showSelectionCheckboxes = false,
  14. bool selectRowsOnTap = false,
  15. ValueChanged<TreeDataTableFilterState>? onFilterChanged,
})

Creates a normal table from a typed eager dataSource.

Implementation

// The explicit subtype keeps eager and lazy configuration distinct.
const TreeDataTable.eager({
  super.key,
  this.headerPinned = true,
  this.headerMinExtent = 51,
  this.headerMaxExtent = 51,
  required this.headerRows,
  required TreeDataTableEagerDataSource dataSource,
  this.persistColumnStateId,
  this.scaleColumnsToFit = false,
  this.rowSelectionMode = TreeDataTableRowSelectionMode.none,
  this.selectedRowIds,
  this.initialSelectedRowIds = const <Object>{},
  this.onRowSelectionChanged,
  this.showSelectionCheckboxes = false,
  this.selectRowsOnTap = false,
  this.onFilterChanged,
})  :
      // ignore: prefer_initializing_formals
      dataSource = dataSource,
      assert(headerMinExtent >= 0, 'headerMinExtent cannot be negative'),
      assert(headerMaxExtent >= headerMinExtent, 'headerMaxExtent must be at least headerMinExtent');