getKeyFromMap static method

String getKeyFromMap(
  1. Map map,
  2. String key
)

Implementation

static String getKeyFromMap(Map map, String key) {
  String currentKey = "";
  for (String tempKey in map.keys) {
    if (map[tempKey] == key) {
      currentKey = tempKey;
      break;
    }
  }
  return currentKey;
}