bluetooth_epos 0.0.1 copy "bluetooth_epos: ^0.0.1" to clipboard
bluetooth_epos: ^0.0.1 copied to clipboard

Flutter plugin that allows to find bluetooth devices

bluetooth_epos #

Flutter plugin that allows to find bluetooth devices & send raw bytes data. Supports both Android and iOS.

Main Features #

  • Android and iOS support
  • Scan for bluetooth devices
  • Send raw List<int> bytes data to a device

Getting Started #

Here are only the most important parts of the code to illustrate how to use the library.

BluetoothManager bluetoothManager = BluetoothManager.instance;
BluetoothDevice _device;

bluetoothManager.startScan(timeout: Duration(seconds: 4));
bluetoothManager.state.listen((state) {
    switch (state) {
    case BluetoothManager.CONNECTED:
        // ...
        break;
    case BluetoothManager.DISCONNECTED:
        // ...
        break;
    default:
        break;
    }
});


await bluetoothManager.connect(_device);

List<int> bytes = latin1.encode('Hello world!\n').toList();
await bluetoothManager.writeData(bytes);

await bluetoothManager.disconnect();
1
likes
110
points
59
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter plugin that allows to find bluetooth devices

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, json_annotation, rxdart

More

Packages that depend on bluetooth_epos