startScan method

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

Starts a scan on the specified scanner and returns a Promise that resolves with a StartScanResponse. If a callback is used, the object is passed to it instead. If the call was successful, the response includes a job handle that can be used in subsequent calls to read scan data or cancel a scan. |scannerHandle| : The handle of an open scanner. This should be a value previously returned from a call to openScanner. |options| : A StartScanOptions object indicating the options to be used for the scan. The StartScanOptions.format property must match one of the entries returned in the scanner's ScannerInfo. |Returns| : Returns a Promise which resolves with the result.

Implementation

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