DartMap.clear()函数-Dart教程|
来源:网络
编辑:浅殇
时间:2022-06-18
从地图中删除所有对。
语法
Map.clear()
返回类型 - void
例
void main() { Map m = {'name':'Tom','Id':'E1001'}; print('Map :${m}'); m.clear(); print('Map after invoking clear() :${m}'); }
它将产生以下 输出
Map :{name: Tom, Id: E1001} Map after invoking clear() :{}
相关文章:
- [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教程|
栏目分类
最新文章