MapChange<K, V>.any constructor

MapChange<K, V>.any(
  1. {bool quiet = false}
)

A constructor that doesn't include information about a MapEmitter change. Will recycle the same object per key/value type to minimize GC.

Implementation

factory MapChange.any({bool quiet = false}) {
  if (quiet) return MapChange<K, V>._any(quiet: true);

  _cache[K] ??= <Type, MapChange>{};
  _cache[K][V] ??= MapChange<K, V>._any();

  return _cache[K][V];
}