removeEditVariable method
Attempt to remove the specified edit Variable from the solver.
Check the Result returned to make sure the operation succeeded. Any
errors will be reported via the message
property on the Result.
Possible Results:
- Result.success: The edit variable was successfully removed from the solver.
- Result.unknownEditVariable: The edit variable was not present in the solver. There was nothing to remove.
Implementation
Result removeEditVariable(Variable variable) {
final info = _edits[variable];
if (info == null) {
return Result.unknownEditVariable;
}
// ignore: unused_local_variable
final result = removeConstraint(info.constraint);
assert(result == Result.success);
_edits.remove(variable);
return Result.success;
}