requestPermission static method

Future<void> requestPermission()

Requests Bluetooth permission.

Implementation

static Future<void> requestPermission() async {
  try {
    await FlutterBluePlus.startScan();
    await FlutterBluePlus.stopScan();
  } catch (error) {
    _log.warning("Couldn't obtain Bluetooth permission. $error");
    return Future.error(BrilliantBluetoothException(error.toString()));
  }
}