ReadableTable<T> constructor
const
ReadableTable<T> ({
- Key? key,
- ReadableTableController<
T> ? controller, - List<
ReadableColumn< ? columns,T> > - List<
T> ? rows, - ReadableSelectionMode selectionMode = ReadableSelectionMode.none,
- bool showHeader = true,
- bool zebra = false,
- bool hoverHighlight = false,
- double rowMinHeight = 52,
- EdgeInsets cellPadding = const EdgeInsets.symmetric(horizontal: 12, vertical: 14),
- Widget? emptyState,
- bool showFilterBar = false,
- bool filterBarSearch = true,
- String filterSearchHint = 'Search…',
- String filterItemNoun = 'row',
- String filterItemNounPlural = 'rows',
- double filterBarGap = 10,
- bool showColumnFilters = false,
- Set<
int> ? initialSelectedRows, - Set<
ReadableCell> ? initialSelectedCells, - int? initialSortColumn,
- bool initialSortAscending = true,
- ValueChanged<
List< ? onRowSelectionChanged,T> > - ValueChanged<
Set< ? onCellSelectionChanged,ReadableCell> > - void onRowTap(
- T value,
- int index
- void onSortChanged()?,
Implementation
const ReadableTable({
super.key,
this.controller,
this.columns,
this.rows,
this.selectionMode = ReadableSelectionMode.none,
this.showHeader = true,
this.zebra = false,
this.hoverHighlight = false,
this.rowMinHeight = 52,
this.cellPadding = const EdgeInsets.symmetric(horizontal: 12, vertical: 14),
this.emptyState,
this.showFilterBar = false,
this.filterBarSearch = true,
this.filterSearchHint = 'Search…',
this.filterItemNoun = 'row',
this.filterItemNounPlural = 'rows',
this.filterBarGap = 10,
this.showColumnFilters = false,
this.initialSelectedRows,
this.initialSelectedCells,
this.initialSortColumn,
this.initialSortAscending = true,
this.onRowSelectionChanged,
this.onCellSelectionChanged,
this.onRowTap,
this.onSortChanged,
}) : assert(controller != null || columns != null,
'Provide a controller, or columns (+ rows).');