removeProperty method

void removeProperty(
  1. ModelProperty prop
)

Implementation

void removeProperty(ModelProperty prop) {
  final foundProp = findSameProperty(prop);
  if (foundProp == null) {
    throw StateError(
        "cannot remove property '${prop.name}' with id ${prop.id}: not found");
  }
  _properties.remove(foundProp);
  model.retiredPropertyUids.add(prop.id.uid);

  if (prop.indexId != null) {
    model.retiredIndexUids.add(prop.indexId!.uid);
  }
}