keyPressed method Null safety

void keyPressed()

When the button is "pressed" with an accelerator key

Implementation

void keyPressed() {
  setState(() {
    _pressed = true;
    _pressedFromKeyboard = true;
  });
  factory.controller.buttonWidgetDown(widget);
}