NashEnhancedDataTable<T> constructor

const NashEnhancedDataTable<T>({
  1. Key? key,
  2. required List<NashDataColumn> columns,
  3. required List<NashDataRow> rows,
  4. int? sortColumnIndex,
  5. bool sortAscending = true,
  6. void onSort(
    1. int columnIndex,
    2. bool ascending
    )?,
  7. bool selectable = false,
  8. void onSelectionChanged(
    1. Set<int> selectedIndices
    )?,
  9. Set<int> selectedRows = const <int>{},
  10. void onRowTap(
    1. int index
    )?,
  11. void onRowDoubleTap(
    1. int index
    )?,
  12. void onRowLongPress(
    1. int index
    )?,
  13. NashTablePagination? pagination,
  14. void onPageChanged(
    1. int index
    )?,
  15. bool exportEnabled = false,
  16. void onExport(
    1. NashTableExportFormat format
    )?,
  17. Widget? emptyStateWidget,
  18. bool loading = false,
  19. Widget? header,
  20. List<Widget>? actions,
  21. CrossAxisAlignment checkboxVerticalAlignment = CrossAxisAlignment.center,
  22. double? dataRowHeight,
  23. double headingRowHeight = 56,
  24. double dividerThickness = 1,
  25. bool showCheckboxColumn = true,
  26. TableBorder? border,
  27. Clip clipBehavior = Clip.none,
  28. bool shrinkWrap = false,
  29. ScrollPhysics? scrollPhysics,
  30. ScrollController? scrollController,
})

Implementation

const NashEnhancedDataTable({
  super.key,
  required this.columns,
  required this.rows,
  this.sortColumnIndex,
  this.sortAscending = true,
  this.onSort,
  this.selectable = false,
  this.onSelectionChanged,
  this.selectedRows = const <int>{},
  this.onRowTap,
  this.onRowDoubleTap,
  this.onRowLongPress,
  this.pagination,
  this.onPageChanged,
  this.exportEnabled = false,
  this.onExport,
  this.emptyStateWidget,
  this.loading = false,
  this.header,
  this.actions,
  this.checkboxVerticalAlignment = CrossAxisAlignment.center,
  this.dataRowHeight,
  this.headingRowHeight = 56,
  this.dividerThickness = 1,
  this.showCheckboxColumn = true,
  this.border,
  this.clipBehavior = Clip.none,
  this.shrinkWrap = false,
  this.scrollPhysics,
  this.scrollController,
});