discoverServices method

  1. @override
Future<void> discoverServices({
  1. bool refresh = false,
})
override

Discover the available services in the BLE device.

Implementation

@override
Future<void> discoverServices({bool refresh = false}) async {
  if (refresh) {
    _servicesFound = HashMap();
  }
  List<String> services = ["00005300-0000-1000-8000-00805f9b34fb"];
  // Track service
  if (_servicesFound.isEmpty) {
    for (var service in services) {
      _servicesFound.putIfAbsent(
          service, () => MockBleService._(device: this, uuid: service));
    }
  }
}