Improve BleUuid API and tests (#62)
* Improve tests * Fix tests * More improvements and ToDos * Final API changes Add tests * Update readme --------- Co-authored-by: Rohit Sangwan <rohitsangwan647@gmail.com>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
// ignore_for_file: use_build_context_synchronously
|
||||
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:universal_ble/universal_ble.dart';
|
||||
import 'package:universal_ble_example/data/capabilities.dart';
|
||||
|
||||
@@ -37,7 +37,7 @@ class _ScanFilterWidgetState extends State<ScanFilterWidget> {
|
||||
List<String> services = widget.servicesFilterController.text.split(',');
|
||||
for (String service in services) {
|
||||
try {
|
||||
serviceUUids.add(BleUuid.parse(service.trim()));
|
||||
serviceUUids.add(BleUuidParser.string(service.trim()));
|
||||
} on FormatException catch (_) {
|
||||
throw Exception("Invalid Service UUID $service");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user