flutter_ble_central 1.0.0
flutter_ble_central: ^1.0.0 copied to clipboard
A Flutter package for scanning BLE data in central mode.
Changelog #
1.0.0 - 2026-09-02 #
⚠ BREAKING CHANGES #
The state types were renamed so this package and flutter_ble_peripheral no longer
declare colliding names. Both old names stay as deprecated aliases in 1.0 and are
removed in the next breaking release, so 0.3.x code keeps compiling with a warning.
BluetoothCentralStateis renamed toCentralBluetoothState. The entries and their order are unchanged, so existing switches keep working; only the type name moves (#116, #128)FlutterBleCentral.onPeripheralStateChangedis renamed toonCentralStateChanged; this package is central mode (#116, #128)FlutterBleCentral.isAdvertisingis removed. No platform ever implemented it, so it always returnedfalse(59c1f8d)- android: a disabled adapter now reports
turnedOffinstead ofdenied, sodeniedmeans only that the permission was refused. Code that readdeniedas "Bluetooth is off" has to switch onturnedOff(#108) - macos: the declared deployment target is 10.15, up from 10.14, which was below Flutter's own floor and could not be honoured (#111)
lib/src/models/enums/bluetooth_central_state.dartis nowcentral_bluetooth_state.dart. Only a directpackage:flutter_ble_central/src/...import breaks; everything is still exported frompackage:flutter_ble_central/flutter_ble_central.dart(#116)
Features #
- add a gatt connection manager for android (#113) (b8220ca)
- apple: serve the gatt client half (#118) (3fd7820)
- windows: serve the gatt client half (#117) (6fd19e8)
- rename the state enums so the two packages stop colliding (#116) (dfcd675)
- keep the old state names as deprecated aliases (#128) (6126f96)
- remove isAdvertising, it was never implemented natively (59c1f8d)
- add an interop harness that runs every call across two devices (#120) (728a7cb)
- rebuild the example app and add pong over the gatt link (#122) (4e34ce5)
Bug Fixes #
- android: report the disconnect instead of closing the client first (#123) (f71904e)
- report a disabled adapter as TurnedOff instead of Denied (#108) (8050f25)
- drop the misleading wire value from FlutterBleCentralState (#107) (b936908)
- darwin callback queue, parse scan results off main thread (#98) (383a747)
- raise the macos deployment target to 10.15 (#111) (0b799ff)
- correct the windows state reporting and plugin teardown (#112) (dd22813)
- windows: connect, scan uuids, and adapter queries against a real peripheral (#121) (5e6bfec)
- windows: report the advertisement and scan response as one scan result (#124) (eb0b97b)
- return the converted map from Uint8ListMapStringConverter.toJson (#106) (057798e)
- example: defer link meter reports made while the tree is locked (#125) (cab1a11)
- remove jetifier from example app, it fails the android build (6340e7b)
0.3.3 #
- [Darwin] Fixed
CBCentralManager.authorizationmacOS 10.15 availability guard - [macOS] Removed CocoaPods integration from example app, migrated to Swift Package Manager
- [Darwin] Scan results are now parsed on CoreBluetooth's own callback queue instead of the main thread, so scan throughput no longer depends on how busy the Flutter UI is
0.3.2 #
- [Windows] Fixed crash when Bluetooth adapter is not present or Bluetooth is disabled
- [Windows] Added comprehensive exception handling throughout the plugin to prevent crashes from WinRT API failures
- [Windows] Fixed potential crashes in scan result processing and state change handlers
0.3.1 #
- Added RSSI to
useLightweightScanResult
0.3.0 #
- Added
isBluetoothOngetter to check if Bluetooth is powered on - Added
isSupportedgetter to check if BLE is supported on the device - Added
enableBluetooth()method (Android/Windows, returns false on Apple platforms) - Added
openBluetoothSettings()method to open system Bluetooth settings - Added
openAppSettings()method to open app settings - [Android] Added Bluetooth state change listener using BroadcastReceiver
- [Android] Added StateChangedHandler for streaming state changes to Flutter
- [Android] Added activity lifecycle callbacks to refresh state when app resumes
- [Darwin] Fixed StateChangedHandler event channel name (was incorrectly using "peripheral" instead of "central")
- [Darwin] Added
hasPermission()support using CBCentralManager.authorization API (iOS 13.1+/macOS 10.15+) - [Windows] Added Bluetooth state change event channel
- [Windows] Added
isSupported,isBluetoothOn,hasPermission,enableBluetoothmethod handlers - [Windows] Added
openBluetoothSettings()andopenAppSettings()methods - [Example] Complete redesign with Material 3 UI
- [Example] Added permission request dialogs with platform-specific UI
- [Example] Added Bluetooth off dialog with enable functionality
0.2.1 #
- [Android] Add a refresh timer that restarts the scan after 4 minutes to prevent Android from changing the state of the scan to "opportunistic".
0.2.0 #
- Update permission system
- Merge iOS and macOS codebase
- Update permission system
- Add enableTimingStats to FlutterBleCentral and disable it by default
0.1.0 #
- [Android] Added useLightweightScanResult for android to improve fast scanning.
- Updated dependencies
0.0.8 #
- [macOS] Fixed build errors.
0.0.7 #
- [Android] Fixed requestPermission not working correctly.
0.0.6 #
Fixed windows search state
0.0.5 #
Various improvements
0.0.4 #
Added windows support.
0.0.3 #
Fixed macOS device address.
0.0.2 #
Fixed serviceUUIDs not being found on android and iOS.
0.0.1 #
Initial release with advertisement data support for Android, iOS and MacOS.