butane_dart 0.1.0 copy "butane_dart: ^0.1.0" to clipboard
butane_dart: ^0.1.0 copied to clipboard

Pure-Dart reactive BLE porcelain and platform abstraction (no Flutter).

butane_dart #

Pure-Dart reactive BLE porcelain and platform abstraction — the core of the Butane plugin family, with no Flutter dependency.

butane_dart defines the reactive central/peripheral porcelain (CentralManager, PeripheralManager: scanning, advertising, connections, GATT services and characteristics) and ButanePlatformInterface, the backend contract concrete transports implement. Flutter apps normally consume it through the butane plugin; pure-Dart programs (CLIs, daemons, tests) can drive a backend directly.

Scan from a Dart program #

import 'package:butane_dart/butane_dart.dart';

Future<void> main() async {
  // With a registered platform backend (e.g. butane_dart_bluez on Linux):
  final central = CentralManager(clientIdentifier: 'my-cli');
  await for (final result in central.scan()) {
    print('${result.peripheral} ${result.rssi}');
  }
}

Backends #

A backend implements ButanePlatformInterface over a real radio. butane_dart_bluez is the pure-Dart BlueZ/D-Bus backend for Linux; the Flutter platform implementations (butane_core_bluetooth, butane_android) bind their native radios through the same contract.

License #

MIT — see LICENSE.

0
likes
160
points
28
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Pure-Dart reactive BLE porcelain and platform abstraction (no Flutter).

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

meta

More

Packages that depend on butane_dart