singleStep method Null safety

  1. @override
void singleStep(
  1. DigitEntry? digitEntryStateFrom
)
override

Perform a single step action by running one instruction, and then returning to an appropriate state (DigitEntry or Running, as determined by the executed instruction).

Implementation

@override
void singleStep(DigitEntry? digitEntryStateFrom) {
  final RunningController rc;
  if (digitEntryStateFrom == null) {
    rc = RunningController(this, digitEntryState: false);
  } else {
    rc = RunningController(this, digitEntryState: true);
    rc.currentDigitEntryState!.takeOverFrom(digitEntryStateFrom);
  }
  state = SingleStepping(rc);
}