replaceAll static method

void replaceAll(
  1. Map map,
  2. String key,
  3. String value
)

Implementation

static void replaceAll(Map map, String key, String value) {
  for (var theItem in map.entries) {
    if (theItem.key == key) {
      map[value] = value;
    }
    if (theItem.value is Map) {
      replaceAll(theItem.value, key, value);
    }
  }
}