FakeGamepadSource class final
Pads that exist only in a test. Events arrive synchronously, so a test can press and look straight after.
- Implemented types
Constructors
Properties
-
connected
→ List<
GamepadInfo> -
The pads connected now.
no setteroverride
-
connections
→ Stream<
GamepadConnectionEvent> -
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stateChanges
→ Stream<
GamepadStateEvent> -
no setteroverride
Methods
-
connect(
String id, {String? name, GamepadType type = gp.GamepadType.xbox, int? vendorId, int? productId}) → GamepadInfo - Plugs a pad in.
-
disconnect(
String id) → void -
dispose(
) → void -
latestState(
String gamepadId) → GamepadState? -
override
-
leftStick(
String id, Offset value) → void -
Pushes the left stick to
value(y down). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
press(
String id, int button) → void -
Holds
buttonalone. -
release(
String id) → void - Lets go of everything.
-
send(
String id, {Set< int> buttons = const {}, Map<String, double> axes = const {}}) → void -
Sends a whole snapshot:
buttonsheld (W3C indices) andaxes. -
start(
) → Future< void> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited