Skip to content
pubscout

flutter_ble_peripheral

3.2.0, released 3 weeks ago by steenbakker.dev

Set a device into BLE peripheral mode and advertise custom services.

$ flutter pub add flutter_ble_peripheral
Source repository

What it does

Enables a mobile or desktop device to act as a Bluetooth Low Energy peripheral, broadcasting service UUIDs, manufacturer data, and service data. It also supports serving a local GATT server with characteristics for notifying and writing.

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

Use it when

  • You need your Flutter app to act as a Bluetooth beacon or peripheral.
  • You want to host a GATT server to communicate with nearby central devices.

Skip it when

  • You only need to scan or connect to peripherals as a central device.
  • You need complex multi-service GATT hosting on platforms that restrict it.

Strengths

  • Cross-platform support for Android, iOS, macOS, and Windows.
  • Includes GATT server capabilities with custom characteristics.
  • Handles background advertising on supported platforms.

Weaknesses

  • Platform limitations restrict certain advertisement fields on iOS and macOS.
  • Requires native permission configurations for Bluetooth and location.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
Yes (build_runner)
Direct dependencies
1

Requires permissions in AndroidManifest.xml, usage descriptions in Info.plist for iOS/macOS, and Bluetooth entitlements on macOS.

import 'package:flutter_ble_peripheral/flutter_ble_peripheral.dart';

final peripheral = FlutterBlePeripheral();
await peripheral.start(
  advertiseData: AdvertiseDataCore(
    serviceUuid: 'bf27730d-860a-4e09-889c-2d8b6a9e0fe7',
    localName: 'My peripheral',
    manufacturerId: 1234,
    manufacturerData: Uint8List.fromList([1, 2, 3]),
  ),
);

Alternatives

Packages that do the same job and could replace flutter_ble_peripheral.

Works with

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