Barcode scanner in Flutter
Barcode scanner in Flutter
All in one Flutter Resource: https://flatteredwithflutter.com/barcode-scanner-in-flutter/
Going through variety of articles on internet, I struck upon the common use case of scanning/reading BarCodes..I always wanted to try this in Android, but always procrastinated, not until now…..
Searching through the flutter packages until I found barcode_scan.
Let’s Begin
Add the dependency of barcode_scan : “0.0.4” in pubspec.yaml.
Next, add the following line in the Android Manifest of your app
<activity android:name="com.apptreesoftware.barcodescan.BarcodeScannerActivity"/>
When, you click on Capture Image button, scanning of barcode takes initialization….
It asks you for accessing the Camera permission. If denied, then response is returned on the UI, with
If given permission, it starts scanning the image with barcode and if found returns the number onto the screen…
Code snippet for scanning barcode :
Articles related to Flutter:
Find the complete program at
P.S………………………………
The Flutter Pub is a medium publication to bring you the latest and amazing resources such as articles, videos, codes, podcasts etc. about this great technology to teach you how to build beautiful apps with it. You can find us on Facebook, Twitter, and Medium or learn more about us here. We’d love to connect! And if you are a writer interested in writing for us, then you can do so through these guidelines.