ModDataTableModal<T> constructor
const
ModDataTableModal<T> ({
- Key? key,
- required List<
ModDataHeader> headers, - required List<
T> data, - required DataTableSource source,
- required dynamic onPageChanged(
- int page
- required int totalRecords,
- required int currentPage,
- required int rowsPerPage,
- BorderStyle borderStyle = BorderStyle.none,
- Color? oddRowColor,
- Color? evenRowColor,
- Color? headerBackgroundColor,
- Color? hoverColor,
- String paginationText = 'of',
- String rowsPerPageText = 'Rows per page',
- dynamic onSort(
- String field,
- SortDirection direction
- dynamic onRowsPerPageChanged(
- int rowsPerPage
- List<
int> availableRowsPerPage = const [5, 10, 15, 20, 50, 100, 200], - double? paginationBorderRadius = 5,
- String? currentSortField,
- SortDirection currentSortDirection = SortDirection.none,
- double rowHeight = 35.0,
- bool fixedHeader = false,
- bool enableSimplePagination = false,
- dynamic onColumnWidthChanged()?,
- bool enableColumnResize = false,
- bool showHorizontalScrollbar = true,
- ModDataTableActionBarConfig? actionBarConfig,
- List<
String> ? columnsShow, - Widget? emptyViewWidget,
- required Widget header,
- Color? modalHeaderColor,
- Color? modalBodyColor,
- ModModalPosition position = ModModalPosition.center,
- ModModalSize size = ModModalSize.lg,
- ModModalHeight height = ModModalHeight.auto,
- bool fullScreen = false,
- double borderRadius = 8.0,
- bool barrierDismissible = true,
- VoidCallback? onClose,
- double? maxWidth,
- double? minWidth,
- double? maxHeight,
- double? minHeight,
- EdgeInsets? bodyPadding,
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(),
});