Table<T> constructor
const
Table<T> ({
- Key? id,
- required List<
T> items, - required List<
TableColumn< columns,T> > - required TableState<
T> state, - bool showHeader = true,
- Style? headerStyle,
- Style? headerSeparatorStyle,
- String headerSeparator = '─',
- bool selectCells = false,
- bool selectRows = false,
- bool selectColumns = false,
- String? columnSeparator,
- Style? columnSeparatorStyle,
- int sortBy(
- T a,
- T b
- bool filter(
- T item
- String placeholder = 'No items',
- bool showScrollIndicators = true,
- void onRowActivated(
- int rowIndex,
- T item
- void onRowsSelectionChanged()?,
- void onColumnsSelectionChanged()?,
- void onCellsSelectionChanged()?,
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);