asyncPoll method

Future<int> asyncPoll(
  1. int asyncRequestId
)

Polls async request status.

Status values: 0 pending, 1 ready, -1 error, -2 cancelled.

Implementation

Future<int> asyncPoll(int asyncRequestId) async {
  final r = await _sendRequest<IntResponse>(
    AsyncPollRequest(_nextRequestId(), asyncRequestId),
  );
  return r.value;
}