W3cubDocs

/Dart 2

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);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-core/Map/Map.fromEntries.html