OpenScannerResponse constructor

OpenScannerResponse({
  1. required String scannerId,
  2. required OperationResult result,
  3. String? scannerHandle,
  4. Map? options,
})

Implementation

OpenScannerResponse({
  /// The scanner ID passed to `openScanner()`.
  required String scannerId,

  /// The result of opening the scanner. If the value of this is
  /// `SUCCESS`, the `scannerHandle` and
  /// `options` properties will be populated.
  required OperationResult result,

  /// If `result` is `SUCCESS`, a
  /// handle to the scanner that can be used for further operations.
  String? scannerHandle,

  /// If `result` is `SUCCESS`,
  /// provides a key-value mapping where the key is a device-specific
  /// option and the value is an instance of [ScannerOption].
  Map? options,
}) : _wrapped = $js.OpenScannerResponse(
        scannerId: scannerId,
        result: result.toJS,
        scannerHandle: scannerHandle,
        options: options?.jsify(),
      );