copyWith method

TableState copyWith({
  1. TableConfig? config,
  2. List<ColumnConfig>? columns,
  3. List<ColumnConfig>? fixedColumns,
  4. List<ColumnConfig>? dataColumns,
  5. List<double>? fixedColumnWidths,
  6. List<double>? dataColumnWidths,
  7. List<ColumnGroup>? columnGroups,
  8. List<Map<String, dynamic>>? originalRows,
  9. List<Map<String, dynamic>>? totalRows,
  10. List<Map<String, dynamic>>? regularRows,
  11. List<Map<String, dynamic>>? visibleRows,
  12. int? totalRowCount,
  13. String? sortField,
  14. bool? sortAscending,
  15. Map<String, String>? columnFilters,
  16. String? globalSearchQuery,
  17. Set<String>? selectedRowIds,
  18. Map<String, Map<String, dynamic>>? selectedRowsData,
  19. bool? isTreeData,
  20. Set<String>? expandedRowIds,
  21. List<TreeRow>? treeRows,
  22. bool? allExpanded,
  23. List<double>? columnWidths,
  24. int? loadedRowCount,
  25. bool? isLoadingMore,
})

Create a copy with updated values

Implementation

TableState copyWith({
  TableConfig? config,
  List<ColumnConfig>? columns,
  List<ColumnConfig>? fixedColumns,
  List<ColumnConfig>? dataColumns,
  List<double>? fixedColumnWidths,
  List<double>? dataColumnWidths,
  List<ColumnGroup>? columnGroups,
  List<Map<String, dynamic>>? originalRows,
  List<Map<String, dynamic>>? totalRows,
  List<Map<String, dynamic>>? regularRows,
  List<Map<String, dynamic>>? visibleRows,
  int? totalRowCount,
  String? sortField,
  bool? sortAscending,
  Map<String, String>? columnFilters,
  String? globalSearchQuery,
  Set<String>? selectedRowIds,
  Map<String, Map<String, dynamic>>? selectedRowsData,
  bool? isTreeData,
  Set<String>? expandedRowIds,
  List<TreeRow>? treeRows,
  bool? allExpanded,
  List<double>? columnWidths,
  int? loadedRowCount,
  bool? isLoadingMore,
}) {
  return TableState(
    config: config ?? this.config,
    columns: columns ?? this.columns,
    fixedColumns: fixedColumns ?? this.fixedColumns,
    dataColumns: dataColumns ?? this.dataColumns,
    fixedColumnWidths: fixedColumnWidths ?? this.fixedColumnWidths,
    dataColumnWidths: dataColumnWidths ?? this.dataColumnWidths,
    columnGroups: columnGroups ?? this.columnGroups,
    originalRows: originalRows ?? this.originalRows,
    totalRows: totalRows ?? this.totalRows,
    regularRows: regularRows ?? this.regularRows,
    visibleRows: visibleRows ?? this.visibleRows,
    totalRowCount: totalRowCount ?? this.totalRowCount,
    sortField: sortField,
    sortAscending: sortAscending ?? this.sortAscending,
    columnFilters: columnFilters ?? this.columnFilters,
    globalSearchQuery: globalSearchQuery,
    selectedRowIds: selectedRowIds ?? this.selectedRowIds,
    selectedRowsData: selectedRowsData ?? this.selectedRowsData,
    isTreeData: isTreeData ?? this.isTreeData,
    expandedRowIds: expandedRowIds ?? this.expandedRowIds,
    treeRows: treeRows ?? this.treeRows,
    allExpanded: allExpanded ?? this.allExpanded,
    columnWidths: columnWidths ?? this.columnWidths,
    loadedRowCount: loadedRowCount ?? this.loadedRowCount,
    isLoadingMore: isLoadingMore ?? this.isLoadingMore,
  );
}