sl_flutter_blue
Introduction
sl_flutter_blue is a Bluetooth Low Energy plugin for Flutter.
It is a maintained fork of the original flutter_blue, adapted and updated by Giuliano Jordao / Scrumlab for modern Flutter and Dart versions.
This plugin provides a cross platform Bluetooth LE API for Android and iOS.
Status
This library is actively used in production apps and the API can evolve until it reaches a stable 1.0.
- Be prepared to handle breaking changes when updating.
- Always test on a real device, emulators usually have limited or no BLE support.
If you have trouble adapting to the latest API or have a specific use case, feel free to open an issue in the GitHub repository.
Cross platform Bluetooth LE
sl_flutter_blue aims to expose as much functionality as possible from both platforms, Android and iOS.
Using the FlutterBlue singleton you can:
- Scan for nearby BLE devices
- Connect to devices (
BluetoothDeviceAPI) - Discover services (
BluetoothService), characteristics (BluetoothCharacteristic) and descriptors (BluetoothDescriptor) - Read and write values
- Subscribe to notifications and indications
Once you have a BluetoothDevice instance you use it to interact with its services, characteristics and descriptors.
Installation
Add the package to your pubspec.yaml:
dependencies:
sl_flutter_blue: ^<latest_version>