WinBleScanner constructor

WinBleScanner({
  1. required List<String> serviceIds,
})

Implementation

WinBleScanner({required this.serviceIds}) {
  WinBle.scanStream.listen((device) {
    for (final serviceId in serviceIds) {
      if (!device.serviceUuids
          .any((id) => id.substring(1, id.length - 1) == serviceId)) return;
    }
    addPeripheral(_createPeripheral(device));
  });
}