Table<T> constructor

const Table<T>({
  1. Key? id,
  2. required List<T> items,
  3. required List<TableColumn<T>> columns,
  4. required TableState<T> state,
  5. bool showHeader = true,
  6. Style? headerStyle,
  7. Style? headerSeparatorStyle,
  8. String headerSeparator = '─',
  9. bool selectCells = false,
  10. bool selectRows = false,
  11. bool selectColumns = false,
  12. String? columnSeparator,
  13. Style? columnSeparatorStyle,
  14. int sortBy(
    1. T a,
    2. T b
    )?,
  15. bool filter(
    1. T item
    )?,
  16. String placeholder = 'No items',
  17. bool showScrollIndicators = true,
  18. void onRowActivated(
    1. int rowIndex,
    2. T item
    )?,
  19. void onRowsSelectionChanged(
    1. Set<int> rows
    )?,
  20. void onColumnsSelectionChanged(
    1. Set<int> columns
    )?,
  21. void onCellsSelectionChanged(
    1. Set<CellCoord> cells
    )?,
})

Implementation

const Table({
  Key? id,
  required this.items,
  required this.columns,
  required this.state,
  this.showHeader = true,
  this.headerStyle,
  this.headerSeparatorStyle,
  this.headerSeparator = '─',
  this.selectCells = false,
  this.selectRows = false,
  this.selectColumns = false,
  this.columnSeparator,
  this.columnSeparatorStyle,
  this.sortBy,
  this.filter,
  this.placeholder = 'No items',
  this.showScrollIndicators = true,
  this.onRowActivated,
  this.onRowsSelectionChanged,
  this.onColumnsSelectionChanged,
  this.onCellsSelectionChanged,
})  : _id = id,
      assert(columns.length > 0);