TTable<T, K> constructor
const
TTable<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, - bool editable = false,
- TGridMode? grid,
- TGridDelegateBuilder? gridDelegate,
- bool? shrinkWrap,
- TListHeaderBuilder? headerBuilder,
- bool? infiniteScroll,
- bool? headerSticky,
- bool? dense,
- Widget rowBuilder(
- BuildContext ctx,
- TListItem<
T, K> item, - int index,
- Widget row,
- Color? rowColorBuilder()?,
- WidgetBuilder? beforeItemsBuilder,
Creates a data table.
Implementation
const TTable({
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,
this.editable = false,
// Theme overrides
this.grid,
this.gridDelegate,
this.shrinkWrap,
this.headerBuilder,
this.footerBuilder,
this.infiniteScroll,
this.headerSticky,
this.footerSticky,
this.dense,
this.rowBuilder,
this.rowColorBuilder,
this.beforeItemsBuilder,
}) : assert(
theme == null ||
(grid == null &&
gridDelegate == null &&
shrinkWrap == null &&
headerBuilder == null &&
footerBuilder == null &&
infiniteScroll == null &&
headerSticky == null &&
footerSticky == null &&
dense == null),
'Cannot provide both theme and individual theme properties.',
);