handleShowImaginary method Null safety

  1. @override
void handleShowImaginary()
override

Implementation

@override
void handleShowImaginary() {
  if (!model.isComplexMode) {
    throw CalculatorError(3);
  }
  final tmpR = model.x;
  final tmpI = model.xImaginary;
  model.xPreserveCLX = tmpI;
  model.display.displayX();
  model.xPreserveCLX = tmpR;
  model.xImaginary = tmpI;
  changeState(ShowState(this));
}