Dart Programming - Map Property isEmpty
Returns true if the Map is empty.
Syntax
Map.isEmpty
Example
void main() {
var details = {'Usrname':'tom','Password':'pass@123'};
print(details.isEmpty);
var hosts = {};
print(hosts.isEmpty);
}
It will produce the following output −
false true
dart_programming_map.htm
Advertisements