FlutterBleLib
FlutterBleLib copied to clipboard
Change ScanResult#isConnectable from nullable boolean to non-nullable enum
https://github.com/Polidea/FlutterBleLib/pull/586#discussion_r610065825
Connectivity with 3 states: Connectivity.noInfo (or notAvailable?), Connectivity.notConnectable, Connectivity.Connectable
Right now it's Bool? isConnectable so ternarily [null, false, true]
it's nullable because it's only available on iOS host OS, on android it is still connectable so null very importantly does not mean false at all!
Therefore I'd also recommend using a less misleading representation being the
enum Connectivity [ .notAvailable| .unsupported, . notConnectable, .connectable]
correspondingly mapping to the Bool? values above.