clear method
void
clear()
override
Removes all entries from the map.
After this, the map is empty.
final planets = <int, String>{1: 'Mercury', 2: 'Venus', 3: 'Earth'};
planets.clear(); // {}
Implementation
clear() {
if (_removableList)
for (var v in _map.values)
(v as IDestructible).off("destroy", _itemDestroyed);
_map.clear();
emitArgs("cleared", [this]);
}