static Map revertMap(Map map) { final Map<String, String> newMap = {}; for (String tempKey in map.keys) { newMap[map[tempKey]] = tempKey; } return newMap; }