📜  dart 键值对列表 - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:03.142000             🧑  作者: Mango

代码示例1
void main() {
  final testMap = {"a": 1, "b": 2, "c": 3, "d": 4, "e": 5};
  for (final mapEntry in testMap.entries) {
    final key = mapEntry.key;
    final value = mapEntry.value;
    print('Key: $key, Value: $value');  // Key: a, Value: 1 ...
  }
}