Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get a working QR code scanner for Flutter web?

I’m kind of expecting the impossible, but asking anyway to ensure I’ve not missed out on any great ideas.

I’ve tried a couple of Flutter QR code scanner libraries, but as I was kind of expecting, none of those would run when I used the web beta support in Chrome for instance.

My question is, is there a Flutter QR code scanner library that works for iOS, Android and Web?

If not, is there a way to write this in Flutter for Web specifically?

There was one Stack Overflow question of running a QR scanner JavaScript library inside a WebView and trying to run a Web version which the post indicated faced issues with camera streaming. Is this a possible approach that would translate to Web?

Is there any other way to have a QR code scanner in Flutter to run in Web?

like image 703
user1854555 Avatar asked Jun 08 '20 20:06

user1854555


People also ask

Can flutter scan a barcode or a QR code?

Please note: on web, only QR codes are supported. Other barcodes and 2D codes cannot be scanned. Web support is in very early stage.


1 Answers

You could use an API like http://goqr.me/api/ in your flutter web project. You just have to use the read command on their api. I think it returns a response in either json or xml. If that isn't enough there are othe apis just search it till you find a cool one

like image 118
Samuel Oluwatodimu Avatar answered Oct 12 '22 17:10

Samuel Oluwatodimu