setOptions method

Future<SetOptionsResponse> setOptions(
  1. String scannerHandle,
  2. List<OptionSetting> options
)

Sets options on the specified scanner and returns a Promise that resolves with a SetOptionsResponse object containing the result of trying to set every value in the order of the passed-in OptionSetting object. If a callback is used, the object is passed to it instead. |scannerHandle| : The handle of the scanner to set options on. This should be a value previously returned from a call to openScanner. |options| : A list of OptionSetting objects to be applied to the scanner. |Returns| : Returns a Promise which resolves with the result.

Implementation

Future<SetOptionsResponse> setOptions(
  String scannerHandle,
  List<OptionSetting> options,
) async {
  var $res = await $js.chrome.documentScan
      .setOptions(
        scannerHandle,
        options.toJSArray((e) => e.toJS),
      )
      .toDart;
  return SetOptionsResponse.fromJS($res);
}