WebDataTableSource constructor

WebDataTableSource({
  1. required List<WebDataColumn> columns,
  2. required List<Map<String, dynamic>> rows,
  3. dynamic onTapRow(
    1. List<Map<String, dynamic>> rows,
    2. int index
    )?,
  4. dynamic onSelectRows(
    1. List<String> selectedRowKeys
    )?,
  5. String? sortColumnName,
  6. bool sortAscending = true,
  7. String? primaryKeyName,
  8. List<String>? filterTexts,
  9. List<String> selectedRowKeys = const [],
})

Implementation

WebDataTableSource({
  required this.columns,
  required this.rows,
  this.onTapRow,
  this.onSelectRows,
  this.sortColumnName,
  this.sortAscending = true,
  this.primaryKeyName,
  this.filterTexts,
  this.selectedRowKeys = const [],
}) {
  if (onSelectRows != null) {
    assert(primaryKeyName != null);
  }
  _rows = [...rows];
  _executeFilter();
  _executeSort();
}