handleOpBeforeCalculate method Null safety
- Model<
ProgramOperation> m, - void opBeforeCalculate(
override
For many of the RCL operations on matrices, we need to take over stack lift, so we do the deferral on beforeCalculate rather than calc.
Implementation
@override
void handleOpBeforeCalculate(Model m, void Function() opBeforeCalculate) {
final matrix = (m as Model15).matrices[matrixNumber];
pressed(m, matrix);
m.deferToButtonUp = DeferredFunction(m, () {
if (!noStackLift) {
// For RCL g <mat>, the column number is in X. It might have come
// from pressing a number key (and NOT enter), or it might have come
// from some other operation. We're about to consume the x and y
// registers. For RCL g <mat>, we should not do stack lift.
opBeforeCalculate();
}
released(m, matrix);
}).run;
}