Skip to content

Commit

Permalink
Added matching of serviceUuid during characteristic search
Browse files Browse the repository at this point in the history
  • Loading branch information
Romcik077 authored and chipweinberger committed Nov 19, 2023
1 parent 5fd6e16 commit add1b97
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/src/bluetooth_characteristic.dart
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,11 @@ class BluetoothCharacteristic {
BmBluetoothCharacteristic? get _bmchr {
if (FlutterBluePlus._knownServices[remoteId] != null) {
for (var s in FlutterBluePlus._knownServices[remoteId]!.services) {
for (var c in s.characteristics) {
if (c.characteristicUuid == uuid) {
return c;
if (s.serviceUuid == serviceUuid) {
for (var c in s.characteristics) {
if (c.characteristicUuid == uuid) {
return c;
}
}
}
}
Expand Down

0 comments on commit add1b97

Please sign in to comment.