Skip to content
pubscout

bluetooth_enable_fork

0.1.7, released a year ago by remyraes.com

Plugin to programmatically enable Bluetooth in Flutter apps

WASM-ready
$ flutter pub add bluetooth_enable_fork
Source repository

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.