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

feat: add web platform #964

Closed
wants to merge 14 commits into from
Closed

feat: add web platform #964

wants to merge 14 commits into from

Conversation

tnc1997
Copy link
Collaborator

@tnc1997 tnc1997 commented Aug 12, 2024

Closes #769

@chipweinberger
Copy link
Owner

sdk: ">=2.15.1 <4.0.0"
sdk: "^3.4.0"

is this change required? why

@tnc1997
Copy link
Collaborator Author

tnc1997 commented Aug 13, 2024

I think that this change is necessary because extension types, which are used by JS interop, were fully introduced in version 3.3.1 of the Dart SDK.

@chipweinberger
Copy link
Owner

chipweinberger commented Aug 13, 2024

oh, also please test / update the example app.

if possible, use 3.3.1.

3.4 is very recent and will annoy people.

@chipweinberger
Copy link
Owner

if (!kIsWeb && Platform.isAndroid)

do we need both?

@chipweinberger
Copy link
Owner

chipweinberger commented Aug 14, 2024

I see your adding a lot of checks for adapterState

on web, can we not detect adapterState?

lets just default it to 'on' then so users dont need to add so many checks.

README.md Outdated
@@ -571,6 +571,10 @@ Make sure you have granted access to the Bluetooth hardware:

<img width="528" alt="Screenshot 2023-12-11 at 10 32 04 AM" src="https://github.com/boskokg/flutter_blue_plus/assets/1863934/554079ef-4627-4dfc-97e3-1f07f84a0f3c">

### Enable the Bluetooth API
Copy link
Owner

Choose a reason for hiding this comment

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

Enable the Bluetooth API for Web

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@tnc1997
Copy link
Collaborator Author

tnc1997 commented Aug 14, 2024

if (!kIsWeb && Platform.isAndroid)

do we need both?

Yes I think so, because Platform is not supported on web, because it is provided by dart:io.

@tnc1997
Copy link
Collaborator Author

tnc1997 commented Aug 14, 2024

I see your adding a lot of checks for adapterState

on web, can we not detect adapterState?

lets just default it to 'on' then so users dont need to add so many checks.

Sure I will push a change to remove the exception from getAdapterState and return BmAdapterStateEnum.on.

@tnc1997
Copy link
Collaborator Author

tnc1997 commented Aug 16, 2024

#969 (comment)

@tnc1997 tnc1997 closed this Aug 16, 2024
@tnc1997 tnc1997 deleted the feat/769 branch August 16, 2024 21:22
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.

[Feature]: Web Bluetooth Support
2 participants