pollEnhancedDocumentVerificationJobStatus method

Future<FlutterEnhancedDocumentVerificationJobStatusResponse> pollEnhancedDocumentVerificationJobStatus(
  1. FlutterJobStatusRequest request,
  2. int interval,
  3. int numAttempts
)

Polls the status of a an enhanced document verification job

The function returns a Future that completes with a FlutterEnhancedDocumentVerificationJobStatusResponse, which contains the status of the job.

Example usage:

var request = FlutterJobStatusRequest(/* parameters */);
var response = await pollEnhancedDocumentVerificationJobStatus(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:

See also:

Implementation

Future<FlutterEnhancedDocumentVerificationJobStatusResponse> pollEnhancedDocumentVerificationJobStatus(
    FlutterJobStatusRequest request, int interval, int numAttempts) {
  return platformInterface.pollEnhancedDocumentVerificationJobStatus(request, interval, numAttempts);
}