getDescriptor method
Return a WebBluetoothRemoteGATTDescriptor for this characteristic.
descriptorUUID
the UUID (lower case) of the descriptor.
The descriptor describes the values stored on the characteristic.
-
May throw SecurityError if the descriptor's UUID is on a blocklist.
-
May throw NetworkError if the GATT server is not connected.
-
May throw InvalidStateError if characteristic is
null
. -
May throw NotFoundError if the descriptor was not found.
See:
Implementation
Future<WebBluetoothRemoteGATTDescriptor> getDescriptor(
final String descriptorUUID) async {
final promise =
_JSUtil.callMethod(_jsObject, "getDescriptor", [descriptorUUID]);
final result = await _JSUtil.promiseToFuture(promise);
return WebBluetoothRemoteGATTDescriptor.fromJSObject(result, this);
}