removeRelation method

void removeRelation(
  1. ModelRelation rel
)

Implementation

void removeRelation(ModelRelation rel) {
  final foundRel = findSameRelation(rel);
  if (foundRel == null) {
    throw StateError(
        "cannot remove relation '${rel.name}' with id ${rel.id}: not found");
  }
  _relations.remove(foundRel);
  model.retiredRelationUids.add(rel.id.uid);
}