Gamepad class
Represents a gamepad controller.
Properties
- appHasFocus ← bool
-
Controls whether the gamepad is active.
no getter
- controller → int
-
The identifier for the current controller.
final
- gamepadBatteryInfo → GamepadBatteryInfo
-
Get the battery type for the gamepad.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- headsetBatteryInfo → GamepadBatteryInfo
-
Get the battery type for a headset attached to the gamepad, if there is
one.
no setter
- isConnected → bool
-
Returns a value for whether the controller is connected.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state ↔ GamepadState
-
The status of the buttons, triggers and thumbsticks on the gamepad.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
updateState(
) → void - Get the current state of the current controller.
-
vibrate(
{int leftMotorSpeed = 0, int rightMotorSpeed = 0}) → void - Activate a gamepad controller's vibration motors.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited