buttonDown method Null safety

void buttonDown(
  1. Operation key
)

Handle an operation due to a press on the keyboard.

Implementation

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);
}