getCalcOperation function
Implementation
CalcOperation? getCalcOperation(String? op) {
if (op == null) return null;
op = op.trim();
if (op.isEmpty) return null;
switch (op) {
case '+':
return CalcOperation.sum;
case '-':
return CalcOperation.subtract;
case '*':
return CalcOperation.multiply;
case '/':
return CalcOperation.divide;
default:
return null;
}
}