pollDocumentVerificationJobStatus method
- FlutterJobStatusRequest request,
- int interval,
- int numAttempts
Polls the status of a document verification job
The function returns a Future that completes with a FlutterDocumentVerificationJobStatusResponse, which contains the status of the job.
Example usage:
var request = FlutterJobStatusRequest(/* parameters */);
var response = await pollDocumentVerificationJobStatus(request, 1000, 5);
This example polls the job status every 1000 milliseconds (1 second) up to 5 times.
The FlutterJobStatusRequest should be configured according to the job requirements and platform interface specifications.
The interval
parameter specifies the duration (in milliseconds) between
each polling attempt.
The numAttempts
parameter defines the number of times the job status will
be polled before giving up.
If the job status is successfully retrieved within the specified attempts, the Future completes with the job status. If not, the Future may complete with an error or the last status retrieved, depending on the platform interface implementation.
Throws:
PlatformException
if there is an error in the platform interface.
Params:
request
: The request object containing the job status request details.interval
: The interval duration (in milliseconds) between each polling attempt.numAttempts
: The number of polling attempts before stopping.
Returns:
- A Future<FlutterDocumentVerificationJobStatusResponse> that completes with the job status.
See also:
Implementation
Future<FlutterDocumentVerificationJobStatusResponse> pollDocumentVerificationJobStatus(
FlutterJobStatusRequest request, int interval, int numAttempts) {
return platformInterface.pollDocumentVerificationJobStatus(request, interval, numAttempts);
}