TableController class

Core table controller that owns ALL business logic This is the single source of truth for table state and behavior

Inheritance

Constructors

TableController({required TableConfig config, required List<Map<String, dynamic>> data})
Create controller from config and data
factory
TableController.fromJson(Map<String, dynamic> json)
Create from JSON (convenience factory)
factory

Properties

config TableConfig
Get current config
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
onSelectionChanged ← void Function(List<Map<String, dynamic>>)?
Set the selection changed callback
no getter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedRows List<Map<String, dynamic>>
Get list of selected rows
no setter
state TableState
Get current state (immutable)
no setter
visibleRowCount int
Get visible row count (respects progressive loading)
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
clearAllFilters() → void
Clear all filters
clearColumnFilter(String field) → void
Clear filter for a specific column
clearSelection() → void
Clear all selection
collapseAll() → void
Collapse all tree rows
dispose() → void
Discards any resources used by the object. After this is called, the object is not in a usable state and should be discarded (calls to addListener will throw after the object is disposed).
override
expandAll() → void
Expand all tree rows
getFilterController(String field) TextEditingController?
Get filter controller for a specific column field
getResponsiveColumnWidths(double availableWidth) List<double>
Get responsive column widths (scale to fit screen)
getSortIndicator(String field) SortIndicator?
Get sort indicator for a column (for UI rendering)
loadMoreRows() → void
Load more rows (progressive loading)
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
onScrollReady(ScrollController vertical, ScrollController horizontal) → void
Called when scroll controllers are ready
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
resetColumnWidths() → void
Reset all column widths to defaults
resetSort() → void
Reset sort to original order
resizeColumn(int globalIndex, double delta) → void
Resize a column Resize a column (determines section automatically)
selectRows(List<String> rowIds, Map<String, Map<String, dynamic>> rowsData) → void
Select multiple rows
setColumnFilter(String field, String value) → void
Set filter for a specific column
setGlobalSearch(String query) → void
Set global search query (searches across all columns)
toggleRowExpanded(String rowId) → void
Toggle tree row expanded/collapsed
toggleRowSelection(String rowId, Map<String, dynamic> rowData) → void
Toggle row selection
toggleSort(String field) → void
Toggle sort on a column (3-state: none → asc → desc → none)
toString() String
A string representation of this object.
inherited
updateColumnsWithBuilders(List<ColumnConfig> newColumns) → void
Update columns with custom cell builders (typically called after construction)
updateData(List<Map<String, dynamic>> newRows) → void
Update data (refresh with new rows)

Operators

operator ==(Object other) bool
The equality operator.
inherited