NormalizedGamepadState class

The current normalized state of a gamepad.

This class keeps mutable state and is intended to be kept up-to-date by calling update with the latest NormalizedGamepadEvent.

Constructors

NormalizedGamepadState()

Properties

axes Map<GamepadAxis, double>
Current state of all axes, keyed by GamepadAxis.
final
buttons Map<GamepadButton, bool>
Current state of all buttons, keyed by GamepadButton.
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

axisValue(GamepadAxis axis) double
Returns the current value of the given axis, or 0.0 if not yet received.
isPressed(GamepadButton button) bool
Returns whether the given button is currently pressed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(NormalizedGamepadEvent event) → void
Updates the state based on the given normalized event.

Operators

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