vital_bluetooth
0.1.1, released 2 weeks ago by an unverified publisher
Bluetooth LE plugin for Flutter with background support and automatic reconnect
What it does
Provides scanning, connecting, GATT operations, notifications, and background mode with queued operations and typed errors.
AI-written summary of version 0.1.1, based on the package's README and metadata. Report an inaccuracy
Use it when
- Wearable or healthcare apps needing continuous BLE data
- Apps that must stay connected in background
- Projects requiring automatic reconnect and operation queuing
Skip it when
- Simple BLE demos without background needs
- Apps that only need one-time reads/writes
Strengths
- Background mode with foreground service
- Automatic reconnect with backoff
- Queued GATT operations per device
- Typed error hierarchy
Weaknesses
- Only BLE (no classic yet)
- Requires platform-specific permissions and setup
- Limited to Flutter 3.29+ and Dart 3.7+
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 1
Add Android permissions (BLUETOOTH_SCAN, BLUETOOTH_CONNECT, FOREGROUND_SERVICE, etc.) and iOS Info.plist keys (NSBluetoothAlwaysUsageDescription, UIBackgroundModes). Set minSdk to 24. No build_runner needed.
import 'package:vital_bluetooth/vital_bluetooth.dart';
final bluetooth = VitalBluetooth();
final status = await bluetooth.requestPermissions();
if (!status.isGranted) return;
final result = await bluetooth.scan(withServices: ['180d'], timeout: const Duration(seconds: 10)).first;
final device = result.device;
await device.connect();
final heartRate = device.characteristic('180d', '2a37')!;
await heartRate.setNotify(true);
heartRate.values.listen((bytes) => print('HR packet: $bytes'));
Alternatives
Packages that do the same job and could replace vital_bluetooth.
- flutter_blue_plus
Flutter plugin for connecting to Bluetooth Low Energy devices.
90Compare - universal_ble
Cross-platform Bluetooth Low Energy (BLE) plugin for Flutter
92Compare - flutter_reactive_ble
Reactive BLE plugin for Android and iOS that supports multiple devices
86Compare - flutter_splendid_ble
A Flutter plugin for Bluetooth Low Energy (BLE) central interactions.
72Compare