buttonDown method Null safety

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

Handle an operation due to a press on the keyboard.

Implementation

@mustCallSuper
void buttonDown(Operation key) {
  lastKey = key;
  if (model.shift != ShiftKey.none) {
    model.shift = ShiftKey.none;
    // key.pressed(this) might set the shift key again.
  }
  state.buttonDown(key);
}