Map<K, List<V>> groupByKey() { Map<K, List<V>> results = {}; this.forEach((e) { results.putIfAbsent(e.key, () => <V>[]).add(e.value); }); return results; }