sqrtOp property Null safety
final
Implementation
static final NormalOperation sqrtOp = NormalOperation.differentFloatAndInt(
floatCalc: (Model m) {
final x = m.xF;
if (x < 0) {
throw CalculatorError(0);
}
m.resultXF = sqrt(x);
},
complexCalc: (Model m) {
m.resultXC = m.xC.sqrt();
},
intCalc: (Model m) => m.resultXI = _sqrtI(m.xI, m),
name: 'sqrt(x)');