readScanData method

Future<ReadScanDataResponse> readScanData(
  1. String job
)

Reads the next chunk of available image data from an active job handle. A response indicating the outcome will be sent to the callback.

It is valid for a response to have result OperationResult.SUCCESS with a zero-length data member. This means the scanner is still working but does not yet have additional data ready. The caller should wait a short time and try again.

When the scan job completes, the response will have the result OperationResult.EOF. This response may contain a final non-zero data member. |job| : Active job handle previously returned from startScan. |callback| : Called with the result.

Implementation

Future<ReadScanDataResponse> readScanData(String job) async {
  var $res = await promiseToFuture<$js.ReadScanDataResponse>(
      $js.chrome.documentScan.readScanData(job));
  return ReadScanDataResponse.fromJS($res);
}