How to scan 2D barcodes in flutter web? - flutter

I have an application, written in flutter, that is heavily dependent on the feature of scanning pdf-417 type codes. In the Android port, it works easily, using the qr_code_scanner 0.0.13 library from pub.dev. I need a web application, for various reasons, and I want to implement the scanning functionality in it. I have tried searching librarys that support the web also, but couldn't find anything relevant. I tried creating a html/js scanner webpage, with zxing-js, that works in a normal browser, but not in the flutter webview, which uses the easy_web_view pub.dev package. It seems from the errors, that it cannot access the camera. What should be the easiest way of solving this? Thanks in advance for your answers.

You can use this package that support web, android and IOS in flutter.
Also see this link

Related

Do iOS and Android Flutter widgets also work on Flutter Web(PWA)

I'm interested in using Flutter primarily for my startup MVP on Web and possibly Android. I see the flutter community has made a lot of widgets but a lot of them are tagged iOS or Android. Since Futter is all about using one codebase is it wrong to assume that these widgets would work on web too? I imagine the setup would be different but similar with a Flutter web app as opposed to a Flutter Android app.
I couldn't find a whole lot about this on the Flutter site. I also know that web is still beta but by the time I'm done with the MVP it'll probably be at stable release or close enough.
Well... It depends. If the widget has some sort of native code the answer is no. In Flutter there are two type of packages: the "normal" package, and the plugin.
The packages are made only of dart code, so there are no bounds to native, and you can use everywhere dart (and Flutter) can run.
The plugins are packages with native code and you can use only on the platform supported by that plugin.
For example the package provider, it's a package, and you can use in every supported platform where dart (and Flutter) can run. But url_launcher, it's a plugin, so you can run only on Android, iOS, and web, but for example on desktop, it will no work.
If the package if you found it's only a widget, you should be able to use on the web.
TLDR: No,a PWA it's a web app, so it can't run Android or iOS specific code.

flutter P2P communication over the network

I read this Android specific article and was wondering if some applications existed for Flutter aswell.
I know it is possible to run native code in Flutter, but I'd prefer a Dart native solution. I've noticed this package on pub.dev but I cannot make it work.
I've followed the posted example but I get a MissingPluginException for every call the plugin executes.
Yes You can do it by using this package .
https://pub.dev/packages/flutter_nearby_connections

how work with contact ,camera, gps in flutter without using plugins

I'm trying to do CRUD on contacts and SMS using flutter, but after so much searching I feel flutter does not have any core options about contacts or SMS. there is nothing in the official documentation.
how work with contacts, camera, GPS in flutter without using plugins?
because the contact has a different implementation in android and IOS you need to have a code for each platform. in flutter its called Plugin or platform-specific code. and as I said there is no way to work with a contact without plugins cause its platform-specific code. if you don't want to use plugin You should write your own plugins for contact. and I think this is the hard way.
if you want to have your own plugin check Writing custom platform-specific code link

Is there any built in flutter library for 2D bar-code scanner?

I am developing a mobile application with Flutter framework and I want to scan bill bar-code and extract its code, so I need a bar-code scanner library for my app. Actually I've googled and found some libraries and SDKs, but they are not written in Dart and I have to import and implement them separately for Android and iOS directories, also it has lots of effort for me to import native codes to a Flutter project. Now I have following questions:
Is there any Dart written and Flutter compatible package, library, SDk, API or ... to use in Flutter project?
Hasn't Google made Flutter version of its ML-KIT or Google-Vision SDKs for its own multi platform framework?
Thanks in advance for helping me.
There are no direct flutter widgets available which supports Barcode reading as of now.
Anyway you can use firebase_ml_vision plugin which pretty straight forward and easy to integrate.
https://pub.dartlang.org/packages/firebase_ml_vision
There is, but I haven't ever used it myself. Just searched it on here: https://pub.dartlang.org/flutter
https://pub.dartlang.org/packages/barcode_scan or maybe this https://pub.dartlang.org/packages/barcode_flutter

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?
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