Repository navigation
Bump flutter_web_bluetooth to ^1.2.0 (3.0.1) - #344
Merged
Merged
Conversation
flutter_web_bluetooth 1.2.0 keeps its own AbortController for the whole advertisement watch and adds a startupTimeout that only bounds the startup, so unwatchAdvertisements can now abort a pending start as well as a running watch. Use that supported API on Web instead of the hand-rolled workaround that drove device.nativeDevice.watchAdvertisements directly with a caller-owned AbortController and a manual .timeout. This removes the two workaround-only imports and the _advertisementControllers / _advertisementStartOperations maps.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
flutter_web_bluetoothfrom^1.1.0to^1.2.0and releaseuniversal_ble3.0.1.1.2.0 keeps its own
AbortControllerfor the whole advertisement watch and adds astartupTimeoutthat only bounds the startup, sounwatchAdvertisements()now aborts a pending start as well as a running watch. The Web implementation previously worked around the 1.1.0 gap by drivingdevice.nativeDevice.watchAdvertisements(...)directly with a caller-ownedAbortControllerand a manual.timeout(...). That is replaced withdevice.watchAdvertisements(null, _advertisementTimeout), removing the two workaround-only imports and the_advertisementControllers/_advertisementStartOperationsmaps.Changes
pubspec.yaml:flutter_web_bluetooth: ^1.2.0; version3.0.1.lib/src/universal_ble_web/universal_ble_web.dart: use the dependency's abort controller andstartupTimeout; simplify_stopAdvertisementWatcher.CHANGELOG.md: 3.0.1 entry.example/pubspec.lock,hil/pubspec.lock: resolved to 1.2.0.Test plan
flutter analyze— no issuesflutter test— 240/240 passedflutter build web(example) — web path compiles against 1.2.0chrome://flags/#enable-experimental-web-platform-features)