simple_barcode_scanner icon indicating copy to clipboard operation
simple_barcode_scanner copied to clipboard

Fix Windows scanner format selection

Open SimoneMariaRomeo opened this issue 6 months ago • 3 comments

Fixes the Windows WebView scanner path so barcode mode is not limited by the HTML scanner defaults.\n\nChanges:\n- pass scanType, cameraFace, custom app bar, and close callback into WindowBarcodeScanner\n- load the Windows barcode asset with scanType/cameraFace query params\n- configure html5-qrcode with explicit QR/barcode format groups and requested camera facing mode\n- guard the Windows webview bridge checks before posting/listening\n\nValidation:\n- flutter test passes\n- flutter analyze still reports only existing info-level lints in untouched files: example use_super_parameters/avoid_print, barcode_controller avoid_print, web.dart missing type annotation, and library name info\n\nI could not live-test a Windows camera device from this environment.

SimoneMariaRomeo avatar May 15 '26 05:05 SimoneMariaRomeo

Pushed a small follow-up commit (dbe2146) to reduce the new Sonar code-smell noise in lib/assets/barcode.html: replaced scanner-page window references with globalThis and changed scanner startup from a promise chain to async/await without changing the scan flow.

Validation:

  • flutter test passed
  • git diff --check passed
  • flutter analyze still reports only existing info-level lints in untouched files (example/lib/main.dart, lib/screens/barcode_controller.dart, lib/screens/web.dart, lib/simple_barcode_scanner.dart)

SimoneMariaRomeo avatar May 15 '26 07:05 SimoneMariaRomeo

Follow-up status after 32729ef:

  • SonarCloud passed again
  • SonarCloud issue API now reports 0 open new-code issues for PR #134
  • flutter test and git diff --check still pass

SimoneMariaRomeo avatar May 15 '26 07:05 SimoneMariaRomeo