addUniqueRelation function
void
addUniqueRelation()
Implementation
void addUniqueRelation(Map<String, List<Map<String, String>>> rm, String key, String value, String type) {
var ok = rm.containsKey(key);
if (!ok) {
rm[key] = [{'outcome': value, 'type': type}];
} else {
bool exists = rm[key]!.any((relation) => relation['outcome'] == value && relation['type'] == type);
if (!exists) {
rm[key]!.add({'outcome': value, 'type': type});
}
}
}