RefreshCellsEvent class

Asks cells to re-read their value, without changing any state.

The grid keeps edited rows out of the immutable state path on purpose — a cellValueSetter mutates the DataGridRow in place and the affected cells are notified through DataGridController.cellValueChanges (see AGENTS.md's cell-edit fast path). Cells decide whether to rebuild by diffing what their own DataGridColumn.valueAccessor returns, which covers every value the grid can actually see.

Dispatch this event for the cases it can't:

  • a row was mutated by application code rather than through UpdateCellEvent / an inline edit, so no notification was ever emitted;
  • a column has no valueAccessor, or its cellWidget reads fields straight off CellScope.row, so there is nothing to diff.

Refreshing is strictly a render concern: no state is produced, rowsById and displayOrder keep their identity, and the virtualization window is untouched. Only the cells named here rebuild.

order.applyDiscount(0.1);            // mutates several fields at once
controller.refreshCells(rowIds: [order.id]);
Inheritance

Constructors

RefreshCellsEvent({List<double> rowIds = const [], List<int>? columnIds})
const

Properties

columnIds List<int>?
Columns to refresh within rowIds. Null refreshes every column of those rows — the usual case, since the point is that the caller doesn't know which columns derive from what changed.
final
hashCode int
The hash code for this object.
no setterinherited
rowIds List<double>
Rows to refresh. Empty means every row currently held by the grid.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

apply<T extends DataGridRow>(EventContext<T> context) DataGridState<T>?
Apply this event's transformation to the state. Returns the new state, or null if no state change should occur. Can return a Future for async operations.
override
loadingMessage() String?
Custom loading message
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldShowLoading(DataGridState<DataGridRow> state) bool
Whether this event should show loading indicator for large datasets
inherited
toString() String
A string representation of this object.
inherited

Operators

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