startScan method

Future<StartScanResponse> startScan(
  1. String scannerHandle,
  2. StartScanOptions options
)

Starts a scan using a previously opened scanner handle. A response indicating the outcome will be sent to the callback. If successful, the response will include a job handle that can be used in subsequent calls to read scan data or cancel a scan. |scannerHandle| : Open scanner handle previously returned from openScanner. |options| : StartScanOptions indicating what options are to be used for the scan. StartScanOptions.format must match one of the entries returned in the scanner's ScannerInfo. |callback| : Called with the result.

Implementation

Future<StartScanResponse> startScan(
  String scannerHandle,
  StartScanOptions options,
) async {
  var $res = await promiseToFuture<$js.StartScanResponse>(
      $js.chrome.documentScan.startScan(
    scannerHandle,
    options.toJS,
  ));
  return StartScanResponse.fromJS($res);
}