Skip to content
pubscout

bluez

0.9.0, released 5 weeks ago by canonical.com

A Dart client for interacting with the Linux BlueZ Bluetooth stack via D-Bus.

$ flutter pub add bluez
Source repository

What it does

It connects to the system BlueZ service, enumerates adapters and devices, and allows operations like discovery, pairing, and GATT communication. All interactions are performed over D-Bus on Linux platforms.

AI-written summary of version 0.9.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need direct Bluetooth control on Linux desktops or embedded devices
  • You want to manage Bluetooth adapters, devices, and GATT services from Dart

Skip it when

  • Running on non‑Linux platforms (iOS, Android, Windows, macOS)
  • You require a cross‑platform Bluetooth solution

Strengths

  • Thin wrapper around the official BlueZ D‑Bus API
  • Supports most BlueZ features including advertising, GATT, and agent registration
  • Pure Dart, no native plugins required

Weaknesses

  • Linux‑only; will throw at runtime on other OSes
  • Relies on the dbus package, so D‑Bus must be available and correctly configured
  • Limited documentation beyond the README

Setup

Kind
Pure Dart
Effort
Low
Code generation
No
Direct dependencies
1
import 'package:bluez/bluez.dart';

final client = BlueZClient();
await client.connect();
for (final device in client.devices) {
  print('Device ${device.address} ${device.alias}');
}
await client.close();

Alternatives

Packages that do the same job and could replace bluez.

Works with

Packages commonly used together with bluez: ones it builds on, ones built on it, and its own family.