updateAttachment method

Future<void> updateAttachment(
  1. Attachment attachmentInfo,
  2. {required String name,
  3. required String contentType,
  4. required Uint8List data}
)

Updates the given attachment of this feature.

Parameters:

  • attachmentInfo — Information describing the attachment.
  • name — The attachment name.
  • contentType — The type of content.
  • data — The attachment data.

Return Value: A Future that has no return value.

Implementation

Future<void> updateAttachment(Attachment attachmentInfo,
    {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_updateAttachment(
        _handle,
        attachmentInfo._handle,
        coreName.bytes,
        coreContentType.bytes,
        coreData.ref,
        errorHandler);
  });
  return taskHandle.toFuture((_) {});
}