A plugin for Flutter apps that adds barcode scanning support on both Android and iOS.
Just clone the repository, open the project in
Android Studio/ VS Code, open
pubspec.yaml and click on
Connect device and hit
run. To run on iPhone you need to run from
Xcode first time and just make
pod install in
Follow the steps for Android and iOS
⚡ Don't worry, you don't need to do anything.
Deployment target : 10 Swift Version : 4.2
As iOS code is written in Swift so you need to convert your existing iOS codebase to swift (or if you are creating a new project from Android Studio make sure to check
Include Swift support for iOS code.)
To do that you can create a new project with same name in different location and then just copy iOS folder to existing.(if any changes made before make sure to add these in iOS(swift)).
After making codebase in swift make sure that the Swift version is
4.2 as the code for iOS is written in Swift 4.2.
To use on iOS, open the Xcode and add camera usage description in
<key>NSCameraUsageDescription</key> <string>Camera permission is required for barcode scanning.</string>
After making the changes in Android ans iOS add flutter_barcode_scanner to
dependencies: ... flutter_barcode_scanner: ^0.0.6
You need to import the package first.
Then use the
scanBarcode method to access barcode scanning.
String barcodeScanRes = await FlutterBarcodeScanner.scanBarcode(COLOR_CODE);
scanBarcode(COLOR_CODE) you can pass hex-color which is the color of line in barcode overlay.
Demonstrates how to use the flutter_barcode_scanner plugin.
Add this to your package's pubspec.yaml file:
dependencies: flutter_barcode_scanner: ^0.0.6
You can install packages from the command line:
$ flutter packages get
Alternatively, your editor might support
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|0.0.6||Mar 23, 2019|
|0.0.5||Mar 23, 2019|
|0.0.4||Mar 12, 2019|
|0.0.3||Mar 11, 2019|
|0.0.2||Mar 8, 2019|
|0.0.1||Mar 8, 2019|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Mar 23, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.
Package is pre-v0.1 release. (-10 points)
While nothing is inherently wrong with versions of
0.0.*, it might mean that the author is still experimenting with the general direction of the API.