搜索插件、代码仓与 APP 分类

插件详情v0.9.0

bluez

提供一个客户端以连接到 BlueZ - Linux 蓝牙堆栈。

Linux
近 30 天下载
37.2万
喜欢数
45
Pub 分数
150

安装插件

flutter pub add bluez

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

bluez 包提供了一个 Dart 客户端,用于连接到 BlueZ(官方 Linux 蓝牙堆栈)。它使在 Linux 上运行的 Flutter 应用程序能够与蓝牙设备交互,实现发现附近设备、建立连接和交换数据等任务。专为 Linux 环境设计,该包可无缝集成到系统的原生蓝牙基础设施中。此包非常适合需要蓝牙功能的 Linux 原生应用开发者,例如物联网控制器、外设通信工具或设备管理实用程序。

适合场景

  • 基于Linux的蓝牙设备发现
  • 连接到蓝牙外设
  • 通过蓝牙控制物联网设备
  • Linux 应用中的蓝牙数据传输
  • 系统级蓝牙集成

主要特点

  • 原生 BlueZ 集成
  • 仅限 Linux 的平台支持
  • 基于 Dart 的异步 API
  • 支持蓝牙 LE 和经典蓝牙
  • 低级别蓝牙堆栈访问

适合对象

  • 针对 Linux 平台的开发者
  • 物联网应用创建者
  • 系统级蓝牙工具构建者
  • Linux桌面应用程序开发者
  • 蓝牙协议实验者

使用建议

  • 仅限 Linux 操作系统
  • 需要运行 BlueZ 守护进程
  • 不支持移动设备或Windows
  • 高级用法需要蓝牙知识
  • 在 Linux 上可能需要配置权限

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Pub Package codecov

Provides a client to connect to BlueZ - the Linux Bluetooth stack.

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();

Supported platforms

This package is designed for use on Linux, as the BlueZ stack is Linux-specific (other platforms have their own Bluetooth stacks). You can safely include this package when writing applications that work on multiple platforms, but it will fail with an exception when being used if BlueZ is not present.

Contributing to bluez.dart

We welcome contributions! See the contribution guide for more details.

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目