entry method
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.");
Return the key/value entry for the given key
, or throws if key
is not in the map.
MapEntry<K, V> entry(K key) => _map.containsKey(key) //
? MapEntry(key, _map[key] as V)
: throw StateError("Key not found.");