discoverCharacteristics static method

Future<List<BleCharacteristic>> discoverCharacteristics({
  1. required String address,
  2. required String serviceId,
  3. bool forceRefresh = false,
})

Implementation

static Future<List<BleCharacteristic>> discoverCharacteristics(
    {required String address,
    required String serviceId,
    bool forceRefresh = false}) async {
  var data = await _channel.invokeMethod("characteristics", args: {
    "device": WinHelper.getDeviceFromAddress(address),
    "service": WinHelper.toWindowsUuid(serviceId),
    "forceRefresh": forceRefresh,
  });
  return List<BleCharacteristic>.from(
      data.map((e) => BleCharacteristic.fromJson(e)));
}