toMap method
Transform the Iterable<MapEntry>
into a map
Example:
[MapEntry("a", 1), MapEntry("b", 2)].toMap(); // {"a": 1, "b": 2}
Implementation
Map<K, V> toMap() {
return Map.fromEntries(this);
}
Transform the Iterable<MapEntry>
into a map
Example:
[MapEntry("a", 1), MapEntry("b", 2)].toMap(); // {"a": 1, "b": 2}
Map<K, V> toMap() {
return Map.fromEntries(this);
}