DartMap.addAll()-Dart教程|
来源:网络
编辑:栗子
时间:2022-06-18
该 Map.addAll() 函数添加的其他所有键值对这个地图。
语法
Map.addAll(Map<K, V> other)
参数
- other - 表示键值对。
返回类型 - void
例
void main() { Map m = {'name':'Tom','Id':'E1001'}; print('Map :${m}'); m.addAll({'dept':'HR','email':'tom@xyz.com'}); print('Map after adding entries :${m}'); }
它将产生以下 输出
Map : {name: Tom, Id: E1001} Map after adding entries : {name: Tom, Id: E1001, dept: HR, email: tom@xyz.com}
相关文章:
- [Dart教程]Dart编程实例-HelloWorld-Dart实例教程|
- [Dart教程]Dart编程实例-第一个Dart程序-Dart实例教程|
- [Dart教程]Dart编程实例-EnablingCheckedMode-Dart实例教程|
- [Dart教程]Dart编程实例-Dart面向对象编程-Dart实例教程|
- [Dart教程]Dart编程实例-Dynamic关键字-Dart实例教程|
- [Dart教程]Dart编程实例-Final关键字-Dart实例教程|
- [Dart教程]Dart编程实例-Const关键字-Dart实例教程|
- [Dart教程]Dart编程实例算术操作符-Dart实例教程|
- [Dart教程]Dart编程实例-相等和关系操作符-Dart实例教程|
- [Dart教程]Dart编程实例-类型测试操作符is-Dart实例教程|
相关推荐:
- [Dart教程]Dartlistremove()-Dart教程|
- [Dart教程]Dartlistadd()-Dart教程|
- [Dart教程]DartList.length方法-Dart教程|
- [Dart教程]DartList.isEmpty-Dart教程|
- [Dart教程]DartStringcodeUnitAt方法-Dart教程|
- [Dart教程]DartNumbertruncate方法-Dart教程|
- [Dart教程]DartNumbrRound方法-Dart教程|
- [Dart教程]DartNumberhashcode属性-Dart教程|
- [Dart教程]Dartwhile-Dart教程|
- [Dart教程]Dart编程调试-Dart教程|
栏目分类
最新文章