dynamic clear(Map map)

Source

static clear(Map map) {
  for (final k in map.keys.toList()) {
    map.remove(k);
  }
}