get<T> method

T? get<T>(
  1. Object key
)

Gets the value associated with key.

Returns the cached value, or null if not found.

Implementation

T? get<T>(Object key) {
  T? result;
  tryGetValue<T>(key, (value) => result = value);
  return result;
}