singleWhere method
Returns the single element that satisfies test
.
Iterable.lastWhere
Implementation
MapEntry<K, V> singleWhere(
bool Function(K key, V value) test, {
MapEntry<K, V> Function()? orElse,
}) {
return entries.singleWhere((entry) => test(entry.key, entry.value), orElse: orElse);
}