ModDataTable<T> constructor
const
ModDataTable<T> ({
- Key? key,
- required List<
ModDataHeader> headers, - required List<
T> data, - required DataTableSource source,
- BorderStyle borderStyle = BorderStyle.none,
- required int rowsPerPage,
- Color? oddRowColor,
- Color? evenRowColor,
- Color? headerColor,
- String paginationText = 'of',
- String rowsPerPageText = 'Rows per page',
- required dynamic onPageChanged(
- int page
- dynamic onSort(
- String field,
- SortDirection direction
- required int totalRecords,
- required int currentPage,
- Color? paginationBackgroundColor,
- 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,
Implementation
const ModDataTable({
super.key,
required this.headers,
required this.data,
required this.source,
this.borderStyle = BorderStyle.none,
required this.rowsPerPage,
this.oddRowColor,
this.evenRowColor,
this.headerColor,
this.paginationText = 'of',
this.rowsPerPageText = 'Rows per page',
required this.onPageChanged,
this.onSort,
required this.totalRecords,
required this.currentPage,
this.paginationBackgroundColor,
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,
});