updateBluetoothState static method

Future<BleState> updateBluetoothState(
  1. bool turnOn
)

To turn on/off ble radio

Implementation

static Future<BleState> updateBluetoothState(bool turnOn) async {
  try {
    var state = await _channel.invokeMethod("changeRadioState", args: {
      "turnOn": turnOn,
    });
    return BleState.parse(state);
  } catch (e) {
    return BleState.Unknown;
  }
}