stopScan static method
Stops a scan for Bluetooth Low Energy devices
Implementation
static Future<void> stopScan() async {
_Mutex mtx = _MutexFactory.getMutexForKey("scan");
await mtx.take();
try {
if(isScanningNow) {
await _stopScan();
} else if (_logLevel.index >= LogLevel.info.index) {
if (kDebugMode) {
print("[FBP] stopScan: already stopped");
}
}
} finally {
mtx.give();
}
}