connect method

Future<void> connect()

Connects the gamepad to the user's device.

Implementation

Future<void> connect() async {
  await services.gamepad.connect(index);
  if (gamepad.isConnected) {
    models.home.setMessage(severity: Severity.info, text: "Connected to gamepad");
  } else {
    models.home.setMessage(severity: Severity.error, text: "No gamepad connected");
  }
  notifyListeners();
}