buttonDown method Null safety

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

Implementation

@override
void buttonDown(Operation key) {
  if (key == Arg.fShift || key == Arg.gShift) {
    lastState.buttonDown(key);
    return;
  }
  final Arg? next = _arg.matches(key, model.userMode);
  if (next == null) {
    changeState(lastState);
    lastState.buttonDown(key);
  } else if (next is ArgDone) {
    done(next);
  } else {
    _arg = next;
  }
}