initializeAndCheckScanning property

Future<bool> initializeAndCheckScanning

Initialize scanning API and check required permissions.

For Android, it will check whether Bluetooth is enabled, allowed to access location services and check whether location services is enabled. For iOS, it will check whether Bluetooth is enabled, requestWhenInUse or requestAlways location services and check whether location services is enabled.

Implementation

Future<bool> get initializeAndCheckScanning async {
  final result = await _methodChannel.invokeMethod('initializeAndCheck');

  if (result is bool) {
    return result;
  }

  return result == 1;
}