getNoPurge method

V? getNoPurge(
  1. Object? key
)

Returns the value associated with key, or null if absent or collected. Same as get, but does NOT purge entries with collected key or value.

Implementation

V? getNoPurge(Object? key) {
  if (key == null || key is! K) return null;

  var k = _EntryKey<K, V>(key);
  // ignore: collection_methods_unrelated_type
  var e = _map[k];
  if (e == null) return null;

  var eValue = e.payload;
  return eValue;
}