bluebird 0.4.0
bluebird: ^0.4.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.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.