groupByKey method
Group the objects according to key
Example:
list.groupByKey("key")
Implementation
Map<T, List<T>> groupByKey(String key) => groupBy((T e) {
if (e is Map && e.containsKey(key)) {
return e[key] as T;
}
throw ArgumentError('Key not found: $key');
});