dotintent / FlutterBleLib

Bluetooth Low Energy library for Flutter with support for simulating peripherals
Apache License 2.0
530 stars 194 forks source link

Allow methods to accept uuid's in upper or lowercase #617

Open MoralCode opened 2 years ago

MoralCode commented 2 years ago

Took me a little while to figure out why I couldn't filter the discovered bluetooth devices with this library. Eventually found it when i noticed that the checks for particular characteristics call .toLowerCase() on the uuid's

Rather than writing documentation, It seems like a better solution is to just update the library to allow the user to provide UUID's in any case (including mixed) and have FlutterBleLib convert them to lowercase internally when performing comparisons.

What kind of places within this plugin are these kinds of comparisons made? Happy to make a pull request if this is something that is desirable

MoralCode commented 2 years ago

It seems like this only affects published versions prior to the current nullsafe one since I am successfully able to use all-caps UUID's when importing the lib as a local path dependency