ModulaDataTable constructor
const
ModulaDataTable({
- required List<
ModulaDataColumn> columns, - required List<
Map< rows,String, dynamic> > - Key? key,
- bool showCheckbox = false,
- bool sortable = false,
- bool hoverEnable = true,
- bool striped = false,
- ModulaDataTableBorder border = ModulaDataTableBorder.horizontal,
- ModulaDataTableSize size = ModulaDataTableSize.medium,
- void onRowSelected(})?,
- void onSelectAll({
- required bool selected,
- void onRowTap()?,
- void onSort(})?,
- String? sortedField,
- bool sortAscending = true,
- Set<
int> selectedRows = const {}, - Widget? emptyWidget,
- bool showPagination = false,
- int currentPage = 1,
- int rowsPerPage = 10,
- int? totalRows,
- void onPageChanged(
- 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,
});