entry method

MapEntry<K, V> entry(
  1. K key
)

Return the key/value entry for the given key, or throws if key is not in the map.

Implementation

MapEntry<K, V> entry(K key) => _map.containsKey(key) //
    ? MapEntry(key, _map[key] as V)
    : throw StateError("Key not found.");