This simple sample uses the camera to read a single barcode using the BarcodeScanner API.
- Latest Flutter SDK
- For Android apps: Android SDK (API Level 21+), platforms and developer tools
- For iOS apps: iOS 13+, macOS with latest Xcode and command line tools
- Android 5.0 (API Level 21) and higher
- iOS 13 and higher
Install Flutter and all required dev tools.
Clone this repository and navigate to the project directory.
cd ScanBarcodes_ReadyToUseComponent/
Fetch and install the dependencies of this example project via Flutter CLI:
flutter pub get
Connect a mobile device via USB and run the app.
Android:
flutter run -d <DEVICE_ID>
You can get the IDs of all connected devices with flutter devices.
iOS:
Install Pods dependencies:
cd ios/
pod install --repo-update
Open the workspace(!) ios/Runner.xcworkspace in Xcode and adjust the Signing / Developer Account settings. Then, build and run the app in Xcode.
Note
- The license string here grants a time-limited free trial which requires network connection to work.
- You can request a 30-day trial license via the Request a Trial License link.
| Linear Barcodes (1D) | 2D Barcodes | Others |
|---|---|---|
| Code 39 (including Code 39 Extended) Code 93 Code 128 Codabar Interleaved 2 of 5 EAN-8 EAN-13 UPC-A UPC-E Industrial 2 of 5 |
QR Code (including Micro QR Code and Model 1) Data Matrix PDF417 (including Micro PDF417) Aztec Code MaxiCode (mode 2-5) DotCode |
Patch Code GS1 Composite Code GS1 DataBar Postal Codes |