addAttachmentCancelable method
Cancelable version of addAttachment. See that method for more information.
Implementation
CancelableOperation<Attachment> addAttachmentCancelable(
{required String name,
required String contentType,
required Uint8List data}) {
final coreName = _CString(name);
final coreContentType = _CString(contentType);
final coreData = data.toByteArrayWrapper();
final taskHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_ArcGISFeature_addAttachment(_handle, coreName.bytes,
coreContentType.bytes, coreData.ref, errorHandler);
});
return taskHandle
.toCancelableOperation((element) => element.getValueAsAttachment()!);
}