Noblest pleasure is the joy of understanding…
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.
Add the dependency of barcode_scan : “0.0.4” in pubspec.yaml.
Next, add the following line in the Android Manifest of your app
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 :
Video demonstration :
Tip (Thanks to Mohamed Salmi) :
You need to add it in the Android Manifest.xml
Find the complete program at