entryOrNull method
Return the key/value entry for the given key
, or null
if key
is not in the map.
Implementation
MapEntry<K, V>? entryOrNull(K key) => _map.containsKey(key) //
? MapEntry(key, _map[key] as V)
: null;
Return the key/value entry for the given key
, or null
if key
is not in the map.
MapEntry<K, V>? entryOrNull(K key) => _map.containsKey(key) //
? MapEntry(key, _map[key] as V)
: null;