GamepadEvent class
Represents a single "input" listened from a gamepad, i.e. a particular change on the state of the buttons and keys.
For KeyType.button, it means a button was either pressed (1.0) or released (0.0). For KeyType.analog, it means the exact value associated with that key was changed.
Constructors
- GamepadEvent({required String gamepadId, required int timestamp, required KeyType type, required String key, required double value})
- GamepadEvent.parse(Map map)
-
factory
Properties
- gamepadId → String
-
The id of the gamepad controller that fired the event.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → String
-
A platform-dependant identifier for the key that was triggered.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timestamp → int
-
The timestamp in which the event was fired, in milliseconds since epoch.
final
- type → KeyType
-
The KeyType of the key that was triggered.
final
- value → double
-
The current value of the key.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited