handleGosubEntryDone method Null safety

void handleGosubEntryDone(
  1. ArgDone label
)

When GSB

Implementation

void handleGosubEntryDone(ArgDone label) {
  // We know that we're coming from a keyboard-entered GSB, since arguments
  // are being input.
  assert(controller is RealController);
  final program = model.memory.program;
  program.resetReturnStack(); // Since we're starting new program
  try {
    label.getCalculation(model, const _OperationSelector())!(model);
  } on CalculatorError catch (e, s) {
    changeState(lastState);
    controller.showCalculatorError(e, s);
    return;
  }
  program.displayCurrent();
  // On button up, another goto(label) will happen, but that's harmless.
}