PagedDataTable<TKey extends Comparable, TResultId extends Comparable, TResult extends Object> constructor

const PagedDataTable<TKey extends Comparable, TResultId extends Comparable, TResult extends Object>({
  1. Future downloadPage({
    1. Map<String, dynamic>? orderBy,
    2. Map<String, dynamic>? searchBy,
    })?,
  2. String? downloadButtonText,
  3. IconData? downloadButtonIcon,
  4. required Future<(List<TResult>, Pagination?)> fetchPage({
    1. Map<String, dynamic>? orderBy,
    2. int? page,
    3. int? perPage,
    4. Map<String, dynamic>? searchBy,
    }),
  5. required TKey initialPage,
  6. required List<BaseTableColumn<TResult>> columns,
  7. required ModelIdGetter<TResultId, TResult> idGetter,
  8. TextTableFilter? mainFilter,
  9. List<TableFilter>? extraFilters,
  10. List<Widget> mainMenus = const [],
  11. List<TableExtraMenu<Object>> extraMenus = const [],
  12. PagedDataTableController<TKey, TResultId, TResult>? controller,
  13. Widget? header,
  14. PagedDataTableThemeData? theme,
  15. List<int>? pageSizes,
  16. int? initialPageSize,
  17. ErrorBuilder? errorBuilder,
  18. WidgetBuilder? noItemsFoundBuilder,
  19. bool rowsSelectable = true,
  20. CustomRowBuilder<TResult>? customRowBuilder,
  21. Stream? refreshListener,
  22. dynamic onItemTap(
    1. TResult
    )?,
  23. List<TableAction<TResult>> tableActions = const [],
  24. List<TableAction<TResult>> actionsBuilder(
    1. TResult item
    )?,
  25. bool isFooterVisible = true,
  26. bool isFilterBarVisible = true,
  27. bool isInSnippet = false,
  28. dynamic actionsTitle(
    1. TResult
    )?,
  29. bool showBorder = true,
  30. bool showTopBorder = true,
  31. bool showFooter = true,
  32. bool isFilterBarRounded = true,
  33. bool showShimmerLoading = true,
  34. Widget expandedRowBuilder(
    1. BuildContext context,
    2. TResult item
    )?,
  35. Future<void> onRowExpanded(
    1. TResult item
    )?,
  36. List<Widget> selectionActionsBuilder(
    1. BuildContext context,
    2. int selectedCount,
    3. List<TResult> selectedItems
    )?,
  37. String? title,
  38. Widget? titleWidget,
  39. Widget? titleIcon,
  40. Color? titleBackgroundColor,
  41. Color? primaryColor,
  42. Key? key,
})

Implementation

const PagedDataTable({
  this.downloadPage,
  this.downloadButtonText,
  this.downloadButtonIcon,
  required this.fetchPage,
  required this.initialPage,
  required this.columns,
  required this.idGetter,
  this.mainFilter,
  this.extraFilters,
  this.mainMenus = const [],
  this.extraMenus = const [],
  this.controller,
  this.header,
  this.theme,
  this.pageSizes,
  this.initialPageSize,
  this.errorBuilder,
  this.noItemsFoundBuilder,
  this.rowsSelectable = true,
  this.customRowBuilder,
  this.refreshListener,
  this.onItemTap,
  this.tableActions = const [],
  this.actionsBuilder,
  this.isFooterVisible = true,
  this.isFilterBarVisible = true,
  this.isInSnippet = false,
  this.actionsTitle,
  this.showBorder = true,
  this.showTopBorder = true,
  this.showFooter = true,
  this.isFilterBarRounded = true,
  this.showShimmerLoading = true,
  this.expandedRowBuilder,
  this.onRowExpanded,
  this.selectionActionsBuilder,
  this.title,
  this.titleWidget,
  this.titleIcon,
  this.titleBackgroundColor,
  this.primaryColor,
  super.key,
});