gamepad library Null safety
- The interface of the Gamepad API defines an individual gamepad or other controller, allowing access to information such as button presses, axis positions, and id. [...]
- The interface defines an individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device. [...]
The GamepadEvent interface of the Gamepad API contains
references to gamepads connected to the system, which is what the
Window.gamepaddisconnectedare fired in response to.