fetchData method

Future<Uint8List> fetchData()

Fetches the attachment's data.

Return Value: A Future that returns an Uint8List.

Implementation

Future<Uint8List> fetchData() {
  final taskHandle = _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_Attachment_fetchData(
      _handle,
      errorHandler,
    );
  });
  return taskHandle.toFuture(
    (element) => element.getValueAsUint8List()!,
  );
}