asyncGetResult method

Future<Uint8List?> asyncGetResult(
  1. int asyncRequestId, {
  2. int? maxBufferBytes,
})

Retrieves binary result for a completed async request.

Returns null when request is not ready or has failed.

Implementation

Future<Uint8List?> asyncGetResult(
  int asyncRequestId, {
  int? maxBufferBytes,
}) async {
  final r = await _sendRequest<QueryResponse>(
    AsyncGetResultRequest(
      _nextRequestId(),
      asyncRequestId,
      maxResultBufferBytes: maxBufferBytes,
    ),
  );
  if (r.error != null) {
    return null;
  }
  return r.data;
}