Dart-programming-map-isempty

提供:Dev Guides
2020年6月23日 (火) 01:14時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

Dartプログラミング-マッププロパティisEmpty

マップが空の場合、trueを返します。

構文

Map.isEmpty

void main() {
   var details = {'Usrname':'tom','Password':'pass@123'};
   print(details.isEmpty);
   var hosts = {};
   print(hosts.isEmpty);
}

次の output が生成されます-

false
true