buttonDown method Null safety

  1. @override
void buttonDown(
  1. Operation key
)
override

Implementation

@override
void buttonDown(Operation key) {
  if (key == controller.gtoOperation) {
    changeState(WaitingForGotoDot(controller, this));
  } else if (key is NonProgrammableOperation) {
    key.pressed(this);
  } else {
    final arg = key.arg;
    if (arg is ArgDone) {
      _addOperation(key, arg);
    } else {
      // This includes gsb and lbl
      controller.state = key.makeInputState(key.arg, controller, this);
    }
  }
}