Map<K, V>.fromEntries constructor

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

Creates a new map and adds all entries.

Creates a new map like new Map<K, V>() and then adds the key and value of eacy entry in entries in iteration order.

Implementation

factory Map.fromEntries(Iterable<MapEntry<K, V>> entries) =>
    <K, V>{}..addEntries(entries);