OpenScannerResponse constructor

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

Implementation

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

  /// Backend result of opening the scanner.
  required OperationResult result,

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

  /// If `result` is `OperationResult.SUCCESS`, a
  /// key-value mapping from option names to `ScannerOption`.
  Map? options,
}) : _wrapped = $js.OpenScannerResponse(
        scannerId: scannerId,
        result: result.toJS,
        scannerHandle: scannerHandle,
        options: options?.jsify(),
      );