Android App Development
iOS App Development
Flutter App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Founder. Opencart
Top Partners
Getting to websites, pictures, and records using QR codes is broadly utilized these days. These QR Codes are used in various daily used apps like BHIM, PhonePe, Paytm, google pay and numerous more and it’s quite easy to build QR Code Scanner in Flutter. Most of the shops, restaurants and bars have started to replace paper menus with QR codes, and retailers now allow you to pay with a QR code rather than touching anything.
Read more about Flutter app development from mobikulIn today’s article, we are going to describe how to build QR code scanner in Flutter apps for android and iOS. There are many packages available but we are going to use qr_code_scanner plugin. Currently this plugin supports android, iOS and web. While I evaluated various barcode scanning apps that didn’t use Google Services (or the ML Kit Vision API), they had certain limitations, such as requiring your app to support Android 7 or newer. Other initiatives appeared to have been abandoned.
Follow the underneath steps to construct a straightforward QR scanner flutter application:
Step 1. Initial setup
Import “qr_code_scanner: ^latest_version” package in your pubspec.yaml file under dependencies like
The most recent version is 0.6.1. Before importing package version, please make sure that you have the most recent one in your pubspec.yaml file.Step 2. Import Package
Import QR code scanner package path in the class file, where you need to use this package
Step 3. Integration
To use this dependency, please update the Gradle, Kotlin and Kotlin Gradle Plugin:
Go to project level gradle file and change ext.kotlin_version = '1.3.50' to ext.kotlin_version = '1.5.0'
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.5.0'
In android/build.gradle change classpath 'com.android.tools.build:gradle:3.5.0' to classpath 'com.android.tools.build:gradle:4.2.0'
android/build.gradle
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:4.2.0'
In app/build.gradle change minSdkVersion 16 to minSdkVersion 21if you don’t upgrade the kotlin, gradle and min sdk verison you will get the error like
app/build.gradle
Add the following permissions into your info.plist file in iOS package of your project
Add the following code into your Web/index.html file
Step 4.You can use following code to create QR code view in your app
Step 5. For getting result data from QR Code scanner, you can use the following code
It’s done!
Please let us know if you have any questions or concerns in the comments area.
You can go through our latest blogs on – https://mobikul.com/blog/
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Webkul is a truly trusted and supported IT Company to develop business ideas for e-commerce. They provide professional support after deploying the solution to production and be responsible to act for fixing the reported issues or system errors. We highly encourage to deal with Webkul for business development.
Hussein Zawia
Co-founder, 24Dokan
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.