diff --git a/lib/bluetooth/connection.dart b/lib/bluetooth/connection.dart index f23e758..b9d0648 100644 --- a/lib/bluetooth/connection.dart +++ b/lib/bluetooth/connection.dart @@ -53,14 +53,16 @@ class Connection { Future performScanning() async { isScanning.value = true; - UniversalBle.getSystemDevices( - withServices: [BleUuid.ZWIFT_CUSTOM_SERVICE_UUID, BleUuid.ZWIFT_RIDE_CUSTOM_SERVICE_UUID], - ).then((devices) { - final baseDevices = devices.map((device) => BaseDevice.fromScanResult(device)).whereNotNull().toList(); - if (baseDevices.isNotEmpty) { - _addDevices(baseDevices); - } - }); + if (!kIsWeb) { + UniversalBle.getSystemDevices( + withServices: [BleUuid.ZWIFT_CUSTOM_SERVICE_UUID, BleUuid.ZWIFT_RIDE_CUSTOM_SERVICE_UUID], + ).then((devices) { + final baseDevices = devices.map((device) => BaseDevice.fromScanResult(device)).whereNotNull().toList(); + if (baseDevices.isNotEmpty) { + _addDevices(baseDevices); + } + }); + } await UniversalBle.startScan( scanFilter: ScanFilter(withServices: [BleUuid.ZWIFT_CUSTOM_SERVICE_UUID, BleUuid.ZWIFT_RIDE_CUSTOM_SERVICE_UUID]),