checkStartRunning method Null safety

  1. @override
void checkStartRunning()

Called from startRunningProgram in order to see if it's OK to start running. Throws CalculatorError if not. This is called as part of a solve or integrate operation that is executed in a program. Not called when solve/integrate is entered from the keyboard.


void checkStartRunning() {
  ProgramRunner? curr = parent;
  while (curr != null) {
    if (curr is SolveProgramRunner) {
      throw CalculatorError(7);
    curr = curr.parent;