DataTable constructor

const DataTable({
  1. Key? key,
  2. required List<String> columns,
  3. required List<List> rows,
  4. double horizontalPadding = AppSpacing.md,
  5. bool showCheckboxes = false,
  6. ValueChanged<int>? onRowSelected,
  7. Set<int> selectedIndices = const <int>{},
  8. Color? headerBackground,
  9. double rowHeight = 48,
  10. bool alternating = true,
  11. bool showVerticalDividers = true,
  12. int? sortColumnIndex,
  13. bool sortAscending = true,
  14. void onSort(
    1. int columnIndex,
    2. bool ascending
    )?,
})

Implementation

const DataTable({
  super.key,
  required this.columns,
  required this.rows,
  this.horizontalPadding = AppSpacing.md,
  this.showCheckboxes = false,
  this.onRowSelected,
  this.selectedIndices = const <int>{},
  this.headerBackground,
  this.rowHeight = 48,
  this.alternating = true,
  this.showVerticalDividers = true,
  this.sortColumnIndex,
  this.sortAscending = true,
  this.onSort,
});