GamepadState class

The current state of a gamepad.

This class keeps mutable state and is intended to be kept up-to-date by calling update with the latest GamepadEvent. The analogInputs and buttonInputs maps correspond to KeyType.analog and KeyType.button, respectively.

Constructors

GamepadState()

Properties

analogInputs Map<String, double>
Contains inputs from events where GamepadEvent.type is KeyType.analog.
final
buttonInputs Map<String, bool>
Contains inputs from events where GamepadEvent.type is KeyType.button.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(GamepadEvent event) → void
Updates the state based on the given event.

Operators

operator ==(Object other) bool
The equality operator.
inherited