GamepadButton class Null safety

The interface defines an individual button of a gamepad or other controller, allowing access to the current state of different types of buttons available on the control device.

A object is returned by querying any value of the array returned by the buttons property of the Gamepad interface. Note: This is the case in Firefox Gecko 28 and later; Chrome and earlier Firefox versions still return an array of double values when this property is accessed.

Annotations

Constructors

GamepadButton()
factory

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
pressed bool
A Boolean value indicating whether the button is currently pressed (true) or unpressed (false).
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
touched bool
read-only
value double
A double value used to represent the current state of analog buttons, such as the triggers on many modern gamepads. The values are normalized to the range 0.0 —1.0, with 0.0 representing a button that is not pressed, and 1.0 representing a button that is fully pressed.
read-only

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
inherited

Operators

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