toMap<K, V> method
Implementation
Map<K, V> toMap<K, V>(MapEntry<K, V> Function(int index, T e) test) {
final Map<K, V> map = {};
for (var i = 0; i < length; i++) {
final item = elementAt(i);
final entry = test(i, item);
map[entry.key] = entry.value;
}
return map;
}