specVersion property
int
get
specVersion
Changes whenever the data behind cellSpec changes.
Without this the cache would either be cleared on every build (throwing away the painters that make scrolling cheap) or never (painting stale text after a sort). The widget layer derives it from the identity of the row list, the columns and the theme.
Implementation
int get specVersion => _specVersion;
set
specVersion
(int value)
Implementation
set specVersion(int value) {
if (_specVersion == value) return;
_specVersion = value;
// Only the positional index goes. Painters are keyed on the full spec and
// verified on every hit, so a cell whose content did not change — nearly
// all of them, under a live feed that replaces a few rows a tick — keeps
// its laid-out text, and a stale one simply misses. The cache stays
// bounded by [_pruneCache].
_byCell.clear();
markNeedsPaint();
markNeedsSemanticsUpdate();
}