stopScan method
Implementation
Future<void> stopScan({
bool stopBle = true,
bool stopUsb = true,
}) async {
try {
if (stopBle) {
await subscription?.cancel();
await FlutterBluePlus.stopScan();
}
if (stopUsb) {
await _usbSubscription?.cancel();
}
} catch (e) {
log('Failed to stop scanning for devices $e');
}
}