addAll 方法
override
将 other 中的所有键/值对添加到该映射中。
如果 other 中的键已存在于该映射中,其值将被覆盖。
此操作相当于对 other 中的每个键及其关联值执行 this[key] = value。它遍历 other,因此在此迭代过程中 other 不应改变。
final planets = <int, String>{1: 'Mercury', 2: 'Earth'};
planets.addAll({5: 'Jupiter', 6: 'Saturn'});
print(planets); // {1: Mercury, 2: Earth, 5: Jupiter, 6: Saturn}
实现
void addAll(Map<String, dynamic> other) {
throw new UnsupportedError("Not supported");
}