Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flutter Web support #241

Closed
realrk95 opened this issue Mar 10, 2021 · 10 comments
Closed

Flutter Web support #241

realrk95 opened this issue Mar 10, 2021 · 10 comments
Labels
Multi platform support Tickets related to adding desktop support

Comments

@realrk95
Copy link

One of the biggest complaints from my customers is the inability to interop between operating systems. We design spectrometers which are used for medical analysis and quality control in pharma industry. Most of our current work is done in Flutter using this library. While this library is very stable for Android/iOS, targeting the web platform will make bluetooth support for Android, Windows, Mac and Linux. Also, since web is now stable, and so is the Web BLE spec on Chrome V8 (Used in Chrome, Edge, Brave, Opera etc.), I think this is the right time to do this.

I would be glad to help with creating a few pull requests which be sandboxed and tested on our/your devices. I'm not an expert programmer, but have enough knowledge to write the web interop and tests. My question is: If I do this, what is the chance that the plugin would be accepted by the community.

@remonh87
Copy link
Contributor

remonh87 commented Mar 10, 2021

@realrk69 we are open to contributions from the community and expanding this library to other platforms is very interesting. Only thing is that we need to have enough ppl that can support maintaining the quality of this library on multiple platforms.

I think before we consider adding additional platforms let's first move to the federated plugin structure as described in: #128 . Now null-safety migration is done this will be the next step. If you need to have multiple platforms incorporated ASAP I would suggest to fork this repo.

So summary: yes we would love to have multiple platform support in this library given 2 preconditions:

  • We have a federated plugin structure in place
  • There is enough knowledge and support from the community to maintain this in order to guarantee the high quality and stability of this library.

@remonh87 remonh87 added general question General question enhancement New feature or request and removed general question General question labels Mar 10, 2021
@remonh87 remonh87 added Multi platform support Tickets related to adding desktop support and removed enhancement New feature or request labels Mar 28, 2021
@realrk95
Copy link
Author

@remonh87 Any update on federated structure? I have an implementation ready for web which I am currently writing tests for. I'm using BleStatus for indicating presence of support for BLE depending on browser support.

@remonh87
Copy link
Contributor

I have a basic structure in place but at the moment I focus on the new OS releases (especially android appears to be some work) .

@realrk95
Copy link
Author

Thanks for the update. Looking forward to whenever it becomes available.

@remonh87
Copy link
Contributor

@realrk95 the federated plugin structure is merged

@realrk95
Copy link
Author

Effectively speaking, there are two ways I can integrate the web support. One is using the native calls from dart to the browser with minimal JS interop. The other is using package:html which gives access to functionalities in the DOM. Which one would you recommend I use for the PR?

I've gone through the updated structure of the plugin and have a good idea of how to implement now, so will be creating the PR by the end of the week.

@mbabuglia
Copy link

Hello @realrk95. Have you seen this project? I haven't used it myself, maybe you can leverage it instead of doing the plumbing from scratch.

@realrk95
Copy link
Author

Hello @realrk95. Have you seen this project? I haven't used it myself, maybe you can leverage it instead of doing the plumbing from scratch.

Damn, I didn't know this. This is good. Thanks for letting me know

@Taym95
Copy link
Collaborator

Taym95 commented Aug 30, 2021

Effectively speaking, there are two ways I can integrate the web support. One is using the native calls from dart to the browser with minimal JS interop. The other is using package:html which gives access to functionalities in the DOM. Which one would you recommend I use for the PR?

I've gone through the updated structure of the plugin and have a good idea of how to implement now, so will be creating the PR by the end of the week.

I would recommend using the native calls from dart to the browser with minimal JS interop, happy to help on the implementation!

@remonh87
Copy link
Contributor

@realrk95 first awesome that you would like to implement a web ble plugin! About the approach: I personally prefer the approach suggested for linux support in: #347 .
Web bluetooth is a totally different cup of tea (not a lot of the maintainers of this library have deep knowledge about( and I would like that someone else can take care of the maintenance of the specific platform implementation so we can focus on the best experience for mobile.

you can also consider going for a non-endorsed plugin which we will promote here and can even incorporate it in the example app. We can also create a discussion on this GitHub page where we can go over the details

@Taym95 Taym95 closed this as completed Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Multi platform support Tickets related to adding desktop support
Projects
None yet
Development

No branches or pull requests

4 participants