bluetooth_manager 0.0.9 copy "bluetooth_manager: ^0.0.9" to clipboard
bluetooth_manager: ^0.0.9 copied to clipboard

outdated

A plugin to manage Bluetooth.

bluetooth_manager #

Bluetooth Manager it's a Plugin to control the bluetooth basics, turning on/off and get the state.

How to Start #

Import the library

    import 'package:bluetooth_manager/bluetooth_manager.dart';

Use exemple #

Example get bluetooth state #

    // Get bluetooth state
    // return a BluetoothState
    // on, off and unknow
    await BluetoothManager.getBluetoothState.then((value) async => {
        // ...
        print(value)
    });

Example turn on/off bluetooth #

    // Enable bluetooth
    await BluetoothManager.enableBluetooth();
    // Disble bluetooth
    await BluetoothManager.disableBluetooth();

Example turn on/off bluetooth #


    // return a ActionResponse
    // bluetoothIsOn, bluetoothIsOff, bluetoothAlreadyOn, bluetoothAlreadyOff, responseError

    // Enable bluetooth and return state
    await BluetoothManager.enableBluetooth().then((value) => {
        // ...
        print(value),
    });
    // Disble bluetooth and return state
    await BluetoothManager.disableBluetooth().then((value) => {
        // ...
        print(value),
     });

    
8
likes
0
points
24
downloads

Publisher

unverified uploader

Weekly Downloads

A plugin to manage Bluetooth.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on bluetooth_manager

Packages that implement bluetooth_manager