我想用 dart 编程语言获取地图的键列表。
我熟悉 python 中的字典,对于 python 中的相同目标,存在一个直接方法。我在飞镖中找不到这个。
他们有解决办法吗?
Ahm*_*out 13
void main() {
var details = {'Usrname':'tom','Password':'pass@123'};
print(details.keys); \\ Gives an Iterable<String>.
\\ And to return a true List:
List newList = details.keys.toList();
}
Run Code Online (Sandbox Code Playgroud)
(Usrname, Password)
| 归档时间: |
|
| 查看次数: |
5921 次 |
| 最近记录: |