discoverServices method

Future<List<BleService>> discoverServices({
  1. Duration? timeout,
})

Discovers the services offered by the device.

Returns cached services if already discovered after connection.

Implementation

Future<List<BleService>> discoverServices({
  Duration? timeout,
}) async {
  List<BleService> servicesCache = await UniversalBle.discoverServices(
    deviceId,
    timeout: timeout,
  );
  CacheHandler.instance.saveServices(deviceId, servicesCache);
  return servicesCache;
}