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.
Libraries
- butane_dart
- Pure-Dart reactive BLE porcelain: CentralManager, PeripheralManager, PeerManager, and the reactive model tree. No Flutter dependency, so it runs from any Dart context — CLI tools, server-side apps, provisioning scripts.
- interface
- The pure-Dart BLE platform abstraction: ButanePlatformInterface and its
raw value types. Implemented by backends (e.g.
butane_dart_bluez) and by the Pigeon native adapter inbutane_platform_interface; consumed by the porcelain inbutane_dart.dart.