IndexMap<K, V>.fromEntries constructor

IndexMap<K, V>.fromEntries(
  1. Iterable<MapEntry<K, V>> entries
)

Creates an IndexMap from entries.

Implementation

factory IndexMap.fromEntries(Iterable<MapEntry<K, V>> entries) {
  final map = IndexMap<K, V>();
  for (final entry in entries) {
    map[entry.key] = entry.value;
  }
  return map;
}