bluebird 0.6.0
bluebird: ^0.6.0 copied to clipboard
A Bluetooth Low Energy (BLE) plugin for Flutter — scan, connect, and read/write GATT on Android, iOS, macOS, and Web.
0.6.0 #
- GATT operations are now ordered by the platform, per device, instead of by a global queue in Dart. A call reaches the platform as soon as it is made, so a janky UI no longer stretches the gap between one operation and the next, and one device's operations no longer wait on another's. Connects are still made one at a time across all devices. Requires the matching
bluebird_android,bluebird_darwinandbluebird_web. - Giving up on an operation (its
timeout) no longer makes the next one fail withoperationInProgressuntil the abandoned one finishes: the next one waits its turn instead. An operation the platform never completes fails withtimeoutafter 35 seconds and, if it was an ATT transaction, disconnects the device, since the link cannot carry another one. disconnect()(withqueue: true) now waits for the operations already requested of that device, rather than for every device's.
0.5.1 #
- Fixed a cancelled scan never finishing its teardown in a widget test, which refused every later scan in that test.
- (Android) Fixed a manufacturer data scan filter with no
datamatching every advertisement. Requiresbluebird_android0.5.1.
0.5.0 #
- Fixed connection and scan issues that could leave the plugin stuck.
adapterStatereports a refused permission on every platform; a scan Android blocks on the location toggle fails withlocationDisabled.
0.4.4 #
- Fixed a scan refused by the platform hanging forever instead of failing. When
startScanwas rejected — the adapter off, the permission denied — the internal advertisement controller was closed without ever having been listened to, soclose()never completed: no error reached the caller, the stream never ended,isScanningstayedtrue, and every later scan was wedged behindoperationInProgressfor the life of the process. - (Darwin) Fixed every non-
poweredOnadapter state being reported asadapterOff.unauthorizednow surfaces aspermissionDeniedandunsupportedasunsupported, fromstartScan,connect, and the operations failed when the adapter goes away mid-flight. The three call for different things from the user — Control Centre, the settings app, and nothing at all — and were indistinguishable to callers. Requiresbluebird_darwin0.4.4.
0.4.3 #
- Fixed a scan outliving the adapter it runs on:
Bluebird.performScan(...)now also ends when the adapter goesunauthorizedorunavailable, not onlyoff/turningOff. Authorization can be revoked from the settings app mid-scan, and the adapter can disappear; either leaves the native scan dead while the stream stays open, waiting for advertisements that can never arrive. - (Android)
bluebird_androidno longer applies the Kotlin Gradle Plugin, so it drops off the "uses plugins that apply KGP" warning list that future Flutter versions will turn into a build failure. Requiresbluebird_android0.4.3.
0.4.2 #
- Fixed (Web) a spurious
deviceDisconnectedwhen a device is disconnected and quickly reconnected: a delayedgattserverdisconnectedevent from the previous connection could tear down the new one. Requiresbluebird_web0.4.2.
0.4.1 #
- Fixed (Android)
AdvertisementData.manufacturerDatawhen an advertisement carries more than one manufacturer specific data structure. Each structure is now keyed by its own company id, instead of being merged into a single blob under the first company id (which leaked later structures' ids into the earlier payload). Requiresbluebird_android0.4.1.
0.4.0 #
- Added L2CAP connection-oriented channel support.
device.openL2capChannel(psm, secure: …)returns aBluetoothL2CapChannel— a bidirectional byte stream to the peer (input/write(...)/close()), independent of GATT, on Android (API 29+) and iOS/macOS (unsupported on Web;secureis Android-only). Data flows over a dedicated binary channel with backpressure in both directions and does not pass through the global GATT operation queue, so its throughput neither gates nor is gated by characteristic I/O. The channel closes on its own when the peer closes it or the device disconnects. - Breaking:
AdvertisementData.advNameis nowString?. It isnullwhen the advertisement carries no name, rather than being coerced to an empty string.mergedWithcarries the prior name forward whenevernewer.advNameisnull.
0.3.0 #
- Breaking:
BluetoothConnectionStatenow hasconnectinganddisconnectingin addition toconnected/disconnected. They are synthesized on the Dart side arounddevice.connect()/disconnect()(the platforms only report the terminal states), sodevice.connectionStatedrives a connecting/disconnecting spinner directly.device.isDisconnectedis removed — it was ambiguous with the new transient states; use!device.isConnected, orconnectionState.value == BluetoothConnectionState.disconnectedfor a fully-disconnected device. - Added an optional
timeouttoBluebird.scan(...): the scan stops and the stream completes normally (not with an error) after the duration, soBluebird.scan(timeout: …).accumulate().lastyields the final device list. Also hardened the advertisement feed against add-after-close.
0.2.1 #
- Stopped re-exporting
Level/Logger/LogRecordfrompackage:logging, which collided with a consumer's ownpackage:loggingimport (unnecessary_import). If you configureBluebird.loggerdirectly, addpackage:loggingto yourpubspec.yaml.
0.2.0 #
- Breaking: logging now flows through a single
package:loggingLogger, exposed asBluebird.logger(withLevel,Logger, andLogRecordre-exported). Nothing is printed by default — attach anonRecordlistener, or callBluebird.configureLoggerPrinting()for a console one-liner. The previous string log stream and defaultprintoutput have been removed. - Breaking: renamed
Bluebird.setLogLeveltosetPlatformLogLevel(andlogLeveltoplatformLogLevel) and removed itscolorargument. It now sets only the native logcat / os_log verbosity; Dart-side output is filtered withBluebird.logger.level. Records are path-scoped ([remoteId][service][characteristic] …), with platform-channel call tracing atLevel.FINEST. - Breaking: reworked error codes around ATT protocol errors.
BluebirdErrorCode.gattError/cbErrorare replaced byandroidError/darwinError(local stack or link failures) andattError(the peer answered with an ATT Error Response). A newBluetoothAttException— withAttErrorconstants andattError— surfaces peer rejections with their raw one-octet code, uniformly across platforms. characteristic.notificationsandcharacteristic.valuesare now broadcast streams: several listeners share one notify enable, and notify is released when the last idle listener (e.g. a mobxObservableStreamorStreamBuilder) cancels.- Fixed Web/WASM compatibility: platform detection no longer pulls
dart:iointo the web build (it is now behind a conditional import), so the package is Web- and WASM-compatible.
0.1.0 #
- Initial release.