Skip to content

Conversation

zhuhaichao518
Copy link
Contributor

I am developing an app requiring web support for gamepads. I would like to contribute to this project. Please help review this pull request. Thanks!

Copy link
Member

@erickzanardo erickzanardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! I will be super cool to have support on web too, I have left some comments, let me know of anything

return controllers;
}

List<dynamic> getGamepadList() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't the list be typed here?

Copy link
Contributor Author

@zhuhaichao518 zhuhaichao518 Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did't get it well. Does the latest implementation look fine?

@zhuhaichao518
Copy link
Contributor Author

@spydon @erickzanardo Any more suggestions?

@spydon
Copy link
Member

spydon commented Dec 10, 2024

Also this:

Because every version of gamepads_web from path depends on web >=0.1.0-beta which requires SDK version >=3.1.0-49.0.dev <4.0.0, gamepads_web from path is forbidden.

So the SDK has to be bumped to 3.4 everywhere, and then you can use web ^1.1.0 (And flutter has to be bumped accordingly).

@markvideon
Copy link
Collaborator

Popping in to mention that there is a Github issue in this project associated with web support. I made a proof of concept for a web implementation earlier this year and I wouldn't consider web to be a stable platform for the purposes of this package, see comments on the issue.

#32

@crcdng
Copy link

crcdng commented Jan 21, 2025

Popping in to mention that there is a Github issue in this project associated with web support. I made a proof of concept for a web implementation earlier this year and I wouldn't consider web to be a stable platform for the purposes of this package, see comments on the issue.

I just ran a test on my Mac with 4 different USB Gamepads (Logitech Gamepad F310, cheap Nintendo NES like, Competition Pro USB, Hama Black Force).

It also reported the events from the devices. Plug and Play in the Browser. Surprisingly, it just works.

I would also argue that all relevant features that game developers need are well established in the GamePad API, as shown here:
https://developer.mozilla.org/en-US/docs/Web/API/Gamepad_API#browser_compatibility.

Therefore it would be really cool to see GamePad support for Flame moving forward on both Windows and on Web.

@spydon
Copy link
Member

spydon commented Sep 8, 2025

@zhuhaichao518 do you have any plans of finishing this up? :)

@zhuhaichao518
Copy link
Contributor Author

zhuhaichao518 commented Sep 15, 2025 via email

@spydon
Copy link
Member

spydon commented Sep 15, 2025

Oh, sure. I will work on this on this weekend. I am also investigating
vibration and I wonder if anyone is working on it. :)

Great to hear! Nobody is working on vibration as far as I know.

@zhuhaichao518
Copy link
Contributor Author

@spydon Hi, I'm not sure if any action is required to move to the next step. I see Because gamepads depends on gamepads_web any which doesn't exist (could not find package gamepads_web at https://pub.dev),/ version solving failed. in CI but I'm quite not familiar with this. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants