Gamepad.forPlatform constructor

Gamepad.forPlatform(
  1. int index
)

Returns a functional instance of this class, or a mock on unsupported platforms.

Implementation

factory Gamepad.forPlatform(int index) => isSdlSupported
  ? DesktopGamepad(index) : MockGamepad(index);