discoverServices method

  1. @override
Future<List<BluetoothService>> discoverServices({
  1. bool? subscribeToServicesChanged,
  2. int? timeout,
})
override

Discover services, characteristics, and descriptors of the remote device

  • subscribeToServicesChanged Android Only: If true, after discovering services we will subscribe to the Services Changed Characteristic (0x2A05) used for the device.onServicesReset stream. Note: this behavior happens automatically on iOS and cannot be disabled

Implementation

@override
Future<List<BluetoothService>> discoverServices(
    {bool? subscribeToServicesChanged, int? timeout}) async {
  await Future.delayed(const Duration(seconds: 1));
  return _services;
}