bluetooth_enable_fork
0.1.7, released a year ago by remyraes.com
Plugin to programmatically enable Bluetooth in Flutter apps
What it does
BluetoothEnable allows an app to request turning on Bluetooth and optionally show a custom dialog. It returns a string indicating success or failure.
AI-written summary of version 0.1.7, based on the package's README and metadata. Report an inaccuracy
Use it when
- When an app needs to enable Bluetooth without user navigating to settings
- When a custom alert is desired before enabling Bluetooth
- When targeting Android 13+ for Bluetooth activation
Skip it when
- When only needing to check Bluetooth status
- When building a full Bluetooth communication stack
Strengths
- Simple API with Future returning result
- Customizable alert dialog
- Supports Android 13 and iOS
- No external dependencies
Weaknesses
- Only enables Bluetooth, no status or scanning APIs
- Returns string instead of bool
- No documentation on error handling
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Add dependency to pubspec, import package, call BluetoothEnable.enableBluetooth or customBluetoothRequest
import 'package:bluetooth_enable_fork/bluetooth_enable.dart';
BluetoothEnable.enableBluetooth.then((result) {
if (result == "true") {
// Bluetooth enabled
}
});Alternatives
Packages that do the same job and could replace bluetooth_enable_fork.
- universal_ble
Cross-platform Bluetooth Low Energy (BLE) plugin for Flutter
92Compare - flutter_blue_plus
Flutter plugin for connecting to Bluetooth Low Energy devices.
90Compare - flutter_web_bluetooth
A Dart library to use the Web Bluetooth API in your projects.
87Compare - flutter_reactive_ble
Reactive BLE plugin for Android and iOS that supports multiple devices
86Compare