changeKeyPressed method

void changeKeyPressed({
  1. required int newKey,
})

Assigns the argument newKey to keyPressed and calls notifyListeners

Implementation

void changeKeyPressed({required int newKey}) /*async*/{
  keyPressed = newKey;
  notifyListeners();
}