ModDataTableModal<T> constructor

const ModDataTableModal<T>({
  1. Key? key,
  2. required List<ModDataHeader> headers,
  3. required List<T> data,
  4. required DataTableSource source,
  5. required dynamic onPageChanged(
    1. int page
    ),
  6. required int totalRecords,
  7. required int currentPage,
  8. required int rowsPerPage,
  9. BorderStyle borderStyle = BorderStyle.none,
  10. Color? oddRowColor,
  11. Color? evenRowColor,
  12. Color? headerBackgroundColor,
  13. Color? footerBackgroundColor,
  14. Color? hoverColor,
  15. String paginationText = 'of',
  16. String rowsPerPageText = 'Rows per page',
  17. dynamic onSort(
    1. String field,
    2. SortDirection direction
    )?,
  18. dynamic onRowsPerPageChanged(
    1. int rowsPerPage
    )?,
  19. List<int> availableRowsPerPage = const [5, 10, 15, 20, 50, 100, 200],
  20. double? paginationBorderRadius = 5,
  21. String? currentSortField,
  22. SortDirection currentSortDirection = SortDirection.none,
  23. double rowHeight = 35.0,
  24. bool fixedHeader = false,
  25. bool enableSimplePagination = false,
  26. dynamic onColumnWidthChanged(
    1. String field,
    2. double newWidth
    )?,
  27. bool enableColumnResize = false,
  28. bool showHorizontalScrollbar = true,
  29. ModDataTableActionBarConfig? actionBarConfig,
  30. List<String>? columnsShow,
  31. Widget? emptyViewWidget,
  32. required Widget header,
  33. Color? modalHeaderColor,
  34. Color? modalBodyColor,
  35. Color? modalFooterColor,
  36. ModModalPosition position = ModModalPosition.center,
  37. ModModalSize size = ModModalSize.lg,
  38. ModModalHeight height = ModModalHeight.auto,
  39. bool fullScreen = false,
  40. double borderRadius = 8.0,
  41. bool barrierDismissible = true,
  42. VoidCallback? onClose,
  43. double? maxWidth,
  44. double? minWidth,
  45. double? maxHeight,
  46. double? minHeight,
  47. EdgeInsets? bodyPadding,
  48. ModDataTableModalFooterConfig footerConfig = const ModDataTableModalFooterConfig(),
})

Implementation

const ModDataTableModal({
  super.key,
  // DataTable required properties
  required this.headers,
  required this.data,
  required this.source,
  required this.onPageChanged,
  required this.totalRecords,
  required this.currentPage,
  required this.rowsPerPage,
  // DataTable optional properties
  this.borderStyle = BorderStyle.none,
  this.oddRowColor,
  this.evenRowColor,
  this.headerBackgroundColor,
  this.footerBackgroundColor,
  this.hoverColor,
  this.paginationText = 'of',
  this.rowsPerPageText = 'Rows per page',
  this.onSort,
  this.onRowsPerPageChanged,
  this.availableRowsPerPage = const [5, 10, 15, 20, 50, 100, 200],
  this.paginationBorderRadius = 5,
  this.currentSortField,
  this.currentSortDirection = SortDirection.none,
  this.rowHeight = 35.0,
  this.fixedHeader = false,
  this.enableSimplePagination = false,
  this.onColumnWidthChanged,
  this.enableColumnResize = false,
  this.showHorizontalScrollbar = true,
  this.actionBarConfig,
  this.columnsShow,
  this.emptyViewWidget,
  // Modal required properties
  required this.header,
  // Modal optional properties
  this.modalHeaderColor,
  this.modalBodyColor,
  this.modalFooterColor,
  this.position = ModModalPosition.center,
  this.size = ModModalSize.lg,
  this.height = ModModalHeight.auto,
  this.fullScreen = false,
  this.borderRadius = 8.0,
  this.barrierDismissible = true,
  this.onClose,
  this.maxWidth,
  this.minWidth,
  this.maxHeight,
  this.minHeight,
  this.bodyPadding,
  this.footerConfig = const ModDataTableModalFooterConfig(),
});