toMap<K, V> method
Transforms this Iterable into map, using key
and value
to produce keys and values respectively.
Implementation
Map<K, V> toMap<K, V>(K Function(T) key, V Function(T) value) => {
for (final element in this)
key(element) : value(element)
};