19
votes

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?

1
Any updates with your research? - el.severo
running the qr code scanner on flutter web yields an error message "Unknown error: unsupported operation: Platform._operatingSystem" - Golden Lion
medium.com/flutter/… If you have a qr code reader in javascript then webviews may be a solution - Golden Lion
I tried ChromeSafariBrowser and it threw a similar error - Golden Lion
gitmemory.com/issue/flutter/flutter/46662/563937930 (the flutter team says it webview is not currently supported in chrome web) I wish they would move all the platforms together before releasing. - Golden Lion

1 Answers

1
votes

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