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. bool selectAllInHeader = true,
  21. CustomRowBuilder<TResult>? customRowBuilder,
  22. Stream? refreshListener,
  23. dynamic onItemTap(
    1. TResult
    )?,
  24. List<TableAction<TResult>> tableActions = const [],
  25. List<TableAction<TResult>> actionsBuilder(
    1. TResult item
    )?,
  26. bool isFooterVisible = true,
  27. bool isFilterBarVisible = true,
  28. bool isInSnippet = false,
  29. dynamic actionsTitle(
    1. TResult
    )?,
  30. bool showBorder = false,
  31. bool showTopBorder = true,
  32. bool embedded = false,
  33. bool showFooter = true,
  34. bool isFilterBarRounded = true,
  35. bool hoistFilterBarToShell = false,
  36. bool showShimmerLoading = true,
  37. Widget expandedRowBuilder(
    1. BuildContext context,
    2. TResult item
    )?,
  38. Future<void> onRowExpanded(
    1. TResult item
    )?,
  39. List<Widget> selectionActionsBuilder(
    1. BuildContext context,
    2. int selectedCount,
    3. List<TResult> selectedItems
    )?,
  40. String? title,
  41. Widget? titleWidget,
  42. Widget? titleIcon,
  43. TextStyle? titleStyle,
  44. Color? titleBackgroundColor,
  45. List<Widget> titleActions = const [],
  46. Color? primaryColor,
  47. bool fillHeight = false,
  48. bool infiniteScroll = false,
  49. ScrollController? pageScrollController,
  50. CLTableStyle? style,
  51. 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.selectAllInHeader = true,
  this.customRowBuilder,
  this.refreshListener,
  this.onItemTap,
  this.tableActions = const [],
  this.actionsBuilder,
  this.isFooterVisible = true,
  this.isFilterBarVisible = true,
  this.isInSnippet = false,
  this.actionsTitle,
  // Foundation: card tabella = L1 + ombra soft, NO border di default (opt-in).
  this.showBorder = false,
  this.showTopBorder = true,
  this.embedded = false,
  this.showFooter = true,
  this.isFilterBarRounded = true,
  this.hoistFilterBarToShell = false,
  this.showShimmerLoading = true,
  this.expandedRowBuilder,
  this.onRowExpanded,
  this.selectionActionsBuilder,
  this.title,
  this.titleWidget,
  this.titleIcon,
  this.titleStyle,
  this.titleBackgroundColor,
  this.titleActions = const [],
  this.primaryColor,
  this.fillHeight = false,
  this.infiniteScroll = false,
  this.pageScrollController,
  this.style,
  super.key,
});