ModulaDataTable constructor

const ModulaDataTable({
  1. required List<ModulaDataColumn> columns,
  2. required List<Map<String, dynamic>> rows,
  3. Key? key,
  4. bool showCheckbox = false,
  5. bool sortable = false,
  6. bool hoverEnable = true,
  7. bool striped = false,
  8. ModulaDataTableBorder border = ModulaDataTableBorder.horizontal,
  9. ModulaDataTableSize size = ModulaDataTableSize.medium,
  10. void onRowSelected(
    1. int index, {
    2. required bool selected,
    })?,
  11. void onSelectAll({
    1. required bool selected,
    })?,
  12. void onRowTap(
    1. int index,
    2. Map<String, dynamic> row
    )?,
  13. void onSort(
    1. String field, {
    2. required bool ascending,
    })?,
  14. String? sortedField,
  15. bool sortAscending = true,
  16. Set<int> selectedRows = const {},
  17. Widget? emptyWidget,
  18. bool showPagination = false,
  19. int currentPage = 1,
  20. int rowsPerPage = 10,
  21. int? totalRows,
  22. void onPageChanged(
    1. int page
    )?,
})

Implementation

const ModulaDataTable({
  required this.columns,
  required this.rows,
  super.key,
  this.showCheckbox = false,
  this.sortable = false,
  this.hoverEnable = true,
  this.striped = false,
  this.border = ModulaDataTableBorder.horizontal,
  this.size = ModulaDataTableSize.medium,
  this.onRowSelected,
  this.onSelectAll,
  this.onRowTap,
  this.onSort,
  this.sortedField,
  this.sortAscending = true,
  this.selectedRows = const {},
  this.emptyWidget,
  this.showPagination = false,
  this.currentPage = 1,
  this.rowsPerPage = 10,
  this.totalRows,
  this.onPageChanged,
});