removeProperty method
- ModelProperty prop
Implementation
void removeProperty(ModelProperty prop) {
if (prop == null) throw Exception('prop == null');
final foundProp = findSameProperty(prop);
if (foundProp == null) {
throw Exception(
"cannot remove property '${prop.name}' with id ${prop.id.toString()}: not found");
}
properties = properties.where((p) => p != foundProp).toList();
model.retiredPropertyUids.add(prop.id.uid);
}