invalidateNodeIndex method

void invalidateNodeIndex()

Marks the id→node index as stale so it gets rebuilt on next lookup.

Implementation

void invalidateNodeIndex() {
  if (_cachedStops != null) {
    print('[INVALIDATE] caretStops invalidated, stack: ${StackTrace.current.toString().split('\n').take(5).join(' | ')}');
  }
  _nodeIndexDirty = true;
  _nodePositionIndexDirty = true;
  _parentCacheDirty = true;
  _cachedStops = null;
  _cachedStopsByContainer = null;
  _cachedContainerOrder = null;
  _cachedLogicalLines = null;
  _flattenedCache = null;
  _logicalContainerCache.clear();
}