operator []= method

void operator []=(
  1. Object? key,
  2. InspectEntry value
)

Sets or updates the InspectEntry for the given key.

Implementation

void operator []=(Object? key, InspectEntry value) {
  // do not cache primitive objects
  if (value is Primitive) {
    return;
  }
  final Object? effectiveKey = _effectiveKey(key);
  final int id = _cache[effectiveKey]?.$1 ?? _nextId;
  _cache[effectiveKey] = (id, value);
}