Map.addAll()函数将所有其他的键/值对添加到此Map。
addAll - 语法
Map.addAll(Map<K, V> other)
other - 代表一个键值对。
addAll - 示例
void main() { Map m={'name':'Learnfk','Id':'E1001'}; print('Map :${m}'); m.addAll({'dept':'HR','email':'[email protected]'}); print('Map after adding entries :${m}'); }
它将产生以下输出-
Map : {name: Learnfk, Id: E1001} Map after adding entries : {name: Learnfk, Id: E1001, dept: HR, email: [email protected]}
参考链接
https://www.learnfk.com/dart-programming/dart-programming-map-function-addall.html
标签:Map,addAll,name,com,无涯,Dart,Learnfk,E1001 From: https://blog.51cto.com/u_14033984/8416366