Scan Barcode/QRcode Flutter web on mobile device

Issue

I’m developing a flutter web to scan barcode & qrcode. when accessing from desktop browser, it’s run fine (show popup to ask permission using camera), but when accessing from mobile browser (android 10), it keeps show loading widget all time. how can I use camera on mobile browser ?

Note

  • I’m using camcode libary (https://pub.dev/packages/camcode)
  • for the code, I’m still run the camcode lib example (my code still on early stage)
  • testing environment: google chrome mobile browser, already turn on camera permission, run the project from terminal

Solution

after trial & error, I found the solution using firebase hosting. so, I build the project then host it on firebase. when accessed, the permission dialog show up

Answered By – aru van housen

Answer Checked By – David Marino (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *