Skip to content

Bump flutter_web_bluetooth to ^1.2.0 (3.0.1) - #344

Merged
fotiDim merged 1 commit into
mainfrom
bump-flutter-web-bluetooth-1.2.0
Oct 14, 2026
Merged

fotiDim merged 1 commit into
mainfrom
bump-flutter-web-bluetooth-1.2.0

Conversation

@fotiDim

@fotiDim fotiDim commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Bump flutter_web_bluetooth from ^1.1.0 to ^1.2.0 and release universal_ble 3.0.1.
  • Adopt the 1.2.0 Web advertisement API instead of the previous workaround.

1.2.0 keeps its own AbortController for the whole advertisement watch and adds a startupTimeout that only bounds the startup, so unwatchAdvertisements() now aborts a pending start as well as a running watch. The Web implementation previously worked around the 1.1.0 gap by driving device.nativeDevice.watchAdvertisements(...) directly with a caller-owned AbortController and a manual .timeout(...). That is replaced with device.watchAdvertisements(null, _advertisementTimeout), removing the two workaround-only imports and the _advertisementControllers / _advertisementStartOperations maps.

Changes

  • pubspec.yaml: flutter_web_bluetooth: ^1.2.0; version 3.0.1.
  • lib/src/universal_ble_web/universal_ble_web.dart: use the dependency's abort controller and startupTimeout; simplify _stopAdvertisementWatcher.
  • CHANGELOG.md: 3.0.1 entry.
  • example/pubspec.lock, hil/pubspec.lock: resolved to 1.2.0.

Test plan

  • flutter analyze — no issues
  • flutter test — 240/240 passed
  • flutter build web (example) — web path compiles against 1.2.0
  • Manual browser smoke test of scan/advertisements (needs chrome://flags/#enable-experimental-web-platform-features)

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.
@fotiDim
fotiDim merged commit e01adbf into main Oct 14, 2026
3 checks passed
@fotiDim
fotiDim deleted the bump-flutter-web-bluetooth-1.2.0 branch October 14, 2026 17:53
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.

1 participant