TDataTable<T, K> constructor
const
TDataTable<T, K> ({
- Key? key,
- required List<
TTableHeader< headers,T, K> > - TTableTheme? theme,
- List<
T> ? items, - int? itemsPerPage,
- String? search,
- int? searchDelay,
- TLoadListener<
T> ? onLoad, - ItemKeyAccessor<
T, K> ? itemKey, - TListController<
T, K> ? controller, - TListExpandedBuilder<
T, K> ? expandedBuilder, - int paginationTotalVisible = 7,
- List<
int> itemsPerPageOptions = const [5, 10, 15, 25, 50], - TGridMode? grid,
- TGridDelegateBuilder? gridDelegate,
- bool? shrinkWrap,
- TListHeaderBuilder? headerBuilder,
- bool? infiniteScroll,
- bool? headerSticky,
- Widget rowBuilder(
- BuildContext ctx,
- TListItem<
T, K> item, - int index,
- Widget row,
- Color? rowColorBuilder()?,
Creates a data table component.
Implementation
const TDataTable({
super.key,
required this.headers,
this.theme,
//List
this.items,
this.itemsPerPage,
this.search,
this.searchDelay,
this.onLoad,
this.itemKey,
this.controller,
//Expandable
this.expandedBuilder,
//DataTable
this.paginationTotalVisible = 7,
this.itemsPerPageOptions = const [5, 10, 15, 25, 50],
// Theme overrides
this.grid,
this.gridDelegate,
this.shrinkWrap,
this.headerBuilder,
this.footerBuilder,
this.infiniteScroll,
this.headerSticky,
this.footerSticky,
this.rowBuilder,
this.rowColorBuilder,
}) : assert(
theme == null ||
(grid == null &&
gridDelegate == null &&
shrinkWrap == null &&
headerBuilder == null &&
footerBuilder == null &&
infiniteScroll == null &&
headerSticky == null &&
footerSticky == null),
'Cannot provide both theme and individual theme properties.',
);