Read label images
Pass PNG, JPEG, WebP or GIF bytes to QrcodeAiScanner.scan(). A Code 128 label encoding STOCK-4827 returns that exact string.
pub.dev
Android + iOS
1D + 2D
MIT
Decode 1D retail, warehouse and 2D matrix labels on Android and iOS without blocking the Flutter UI isolate.
Pass PNG, JPEG, WebP or GIF bytes to QrcodeAiScanner.scan(). A Code 128 label encoding STOCK-4827 returns that exact string.
Pass raw RGBA pixels to QrcodeAiScanner.scanFrame() on the Rust worker pool while your Flutter app owns camera capture and UI.
Read each detection’s Symbology enum and content.text string so leading zeros survive, then query your own inventory backend.
Add qr_barcode_scanner from pub.dev, initialize the bridge once and decode barcode labels off the UI isolate.
Install qr_barcode_scanner on pub.dev under verified publisher qrcode-ai.com. Current releases ship cargokit metadata for Ed25519-signed precompiled libraries on Android (4 ABIs) and iOS or source builds.
Platform toolchain note: iOS builds cleanly (with a Swift Package Manager warning only). On Android, current Flutter 3.50 toolchains requiring AGP 9.1.1+ and Gradle 9.3.1+ fail inside cargokit because Gradle 9 removed Project.exec(); use a Gradle 8 Android toolchain or check the Flutter README for the Gradle 9 cargokit fix before upgrading.
flutter pub add qr_barcode_scanner
Without rustup, cargokit downloads signed precompiled binaries automatically. With rustup installed, set use_precompiled_binaries: true in cargokit_options.yaml next to pubspec.yaml to skip compiling Rust.
Building from source requires Rust 1.88+ and Android NDK r28+ (for 16 KB memory page alignment).
Call QrcodeAiScanner.init() once, then await QrcodeAiScanner.scan() with label image bytes and keep the barcode symbologies your app requires.
To test with a known fixture, create a Code 128 barcode with Barcode Generator containing STOCK-4827 and scan the exported PNG.
import 'dart:typed_data';
import 'package:qr_barcode_scanner/qr_barcode_scanner.dart';
Future<List<({Symbology symbology, String text})>> readBarcodes(Uint8List bytes) async {
await QrcodeAiScanner.init();
final report = await QrcodeAiScanner.scan(bytes, profile: 'frame');
if (report.trace.budgetExhausted == true) {
return const [];
}
return report.detections
.where((d) => d.symbology != Symbology.qrCode && !d.content.charset.isLossy)
.map((d) => (symbology: d.symbology, text: d.content.text))
.toList();
}
Switch profile to 'full' or pass budgetMs: 0 for worn or low-contrast labels (and during slow debug simulator runs).
For live camera scanning, pass raw RGBA pixels to QrcodeAiScanner.scanFrame(rgba, width, height) while your app manages camera permissions.
For a Code 128 label encoding STOCK-4827, readBarcodes resolves to [(symbology: Symbology.code128, text: 'STOCK-4827')]. A UPC-A code such as 012345678905 keeps its leading zero intact as a Dart String.
A blank image or QR-only photo returns an empty list. Invalid image bytes throw an error ending in [QRS-xxx]; negative budgetMs throws RangeError before native execution.
Sixteen barcode formats. Decodes EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, Codabar, ITF, Telepen, GS1 DataBar, GS1 DataBar Expanded, Data Matrix, PDF417, Aztec and MaxiCode (ISBN maps to ean13, GS1-128 to code128, ITF-14 to itf).
Signed binaries and simulator budgets. Cargokit verifies Ed25519 signatures on precompiled libraries for Android (4 ABIs) and iOS before falling back to Rust 1.88+ / NDK r28+ source builds. Use budgetMs: 0 if debug simulators hit budgetExhausted.
Strings and MIT license. Keep values as Dart String so leading zeros survive and query product catalogs separately. Current releases are MIT-licensed; see the Flutter binding README and Flutter API guide.
Official package documentation, ScanReport specification and licensing references.
pub.dev, formats, leading zeros, cargokit binaries, UI isolate and licensing.
It is QR Code AI’s open-source MIT Flutter package (qr_barcode_scanner on pub.dev under verified publisher qrcode-ai.com) for decoding 16 1D and 2D barcode formats plus QR codes on Android and iOS via flutter_rust_bridge.
It reads EAN-13, EAN-8, UPC-A, UPC-E, Code 128, Code 39, Code 93, Codabar, ITF, Telepen, GS1 DataBar, GS1 DataBar Expanded, Data Matrix, PDF417, Aztec and MaxiCode, plus QR Code, Micro QR and rMQR.
Not when signed precompiled binaries are used. Without rustup, cargokit downloads and verifies Ed25519-signed libraries automatically; with rustup installed, set use_precompiled_binaries: true in cargokit_options.yaml or build from source with Rust 1.88+ and Android NDK r28+.
No. Each detection returns its Symbology enum and exact content.text String (plus parsed GS1 payload fields when present), keeping leading zeros intact. Product lookups stay in your own backend or database.
iOS builds and runs cleanly (displaying only a Swift Package Manager warning). On Android, projects using Flutter 3.50 with AGP 9.1.1+ and Gradle 9.3.1+ fail during compilation because cargokit still calls Project.exec(), which Gradle 9 removed; use a Gradle 8 Android toolchain or check the Flutter README for the Gradle 9 fix before targeting Gradle 9.
A blank image returns an empty detections list (verify report.trace.budgetExhausted is false; pass budgetMs: 0 on slow debug simulators). Invalid image bytes throw an error ending in [QRS-xxx].
No. Decoding runs locally on the device off the Dart UI isolate with no Google Play Services dependency, no hosted API calls, no QR Code AI account and no creation credits.
Yes. Current releases are MIT-licensed for commercial and proprietary applications while preserving copyright and license notices (see LICENSING.md). SDK use is separate from QR Code AI’s paid creation plans and seven-day Premium trial.