get method

V? get(
  1. K key
)

Implementation

V? get(K key) {
  if (!_cache.containsKey(key))
    return null;

  // Move key to the end to mark it as recently used
  final value = _cache.remove(key)!;
  _cache[key] = value;

  return value;
}