TDataTable<T> constructor

const TDataTable<T>({
  1. Key? key,
  2. required List<TTableHeader<T>> headers,
  3. TTableDecoration decoration = const TTableDecoration(),
  4. TTableController<T>? tableController,
  5. TTableInteractionConfig interactionConfig = const TTableInteractionConfig(),
  6. bool shrinkWrap = false,
  7. List<T>? items,
  8. int itemsPerPage = 10,
  9. List<int> itemsPerPageOptions = const [5, 10, 15, 25, 50],
  10. int searchDelay = 2500,
  11. bool loading = false,
  12. String? search,
  13. TLoadListener<T>? onLoad,
  14. String itemToString(
    1. T
    )?,
  15. ValueNotifier<String>? searchNotifier,
  16. TPaginationController? controller,
  17. bool expandable = false,
  18. bool singleExpand = true,
  19. Widget expandedBuilder(
    1. T item,
    2. int index,
    3. bool isExpanded
    )?,
  20. bool selectable = false,
  21. bool singleSelect = false,
  22. bool infiniteScroll = false,
})

Implementation

const TDataTable({
  super.key,
  required this.headers,
  this.decoration = const TTableDecoration(),
  this.tableController,
  this.interactionConfig = const TTableInteractionConfig(),
  this.shrinkWrap = false,
  this.items,
  this.itemsPerPage = 10,
  this.itemsPerPageOptions = const [5, 10, 15, 25, 50],
  this.searchDelay = 2500,
  this.loading = false,
  this.search,
  this.onLoad,
  this.itemToString,
  this.searchNotifier,
  this.controller,

  // Expandable
  this.expandable = false,
  this.singleExpand = true,
  this.expandedBuilder,

  // Selectable
  this.selectable = false,
  this.singleSelect = false,

  // Infinite scroll
  this.infiniteScroll = false,
});