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 stay intact, then query your own inventory backend.
Add qr_barcode_scanner from pub.dev, initialise 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 include cargokit metadata for Ed25519-signed precompiled libraries on Android (4 ABIs) and iOS or local source builds.
Platform toolchain note: iOS builds cleanly (showing only a Swift Package Manager warning). 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(); stay on a Gradle 8 Android toolchain or check the Flutter README for the Gradle 9 cargokit patch before upgrading.
flutter pub add qr_barcode_scanner
Without rustup, cargokit fetches signed precompiled binaries automatically. With rustup installed, set use_precompiled_binaries: true in cargokit_options.yaml beside pubspec.yaml to skip local Rust compilation.
Building from source needs 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 filter for the barcode symbologies your app handles.
To test against a known sample, 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 slower debug simulator runs).
For live camera capture, pass raw RGBA pixels to QrcodeAiScanner.scanFrame(rgba, width, height) while your app handles camera permissions.
For a Code 128 label encoding STOCK-4827, readBarcodes resolves to [(symbology: Symbology.code128, text: 'STOCK-4827')]. A UPC-A value 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. Pass budgetMs: 0 if debug simulators hit budgetExhausted.
Strings and MIT licence. Keep decoded values as Dart String so leading zeros survive and query product catalogues separately. Current releases carry the MIT licence; review 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-licensed 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 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, plus QR Code, Micro QR and rMQR.
Not when signed precompiled binaries are used. Without rustup, cargokit downloads and checks Ed25519-signed libraries automatically; if rustup is installed, set use_precompiled_binaries: true in cargokit_options.yaml or compile 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 catalogue lookups remain in your own backend or database.
iOS builds and runs cleanly (showing only a Swift Package Manager warning). On Android, projects on 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 patch before upgrading.
A blank image returns an empty detections list (verify that report.trace.budgetExhausted is false; pass budgetMs: 0 on slower debug simulators). Invalid image bytes throw an error ending in [QRS-xxx].
No. Decoding runs locally on the mobile device off the Dart UI isolate with no Google Play Services dependency, zero hosted API calls, no QR Code AI account, no API key and no creation credits.
Yes. Current releases carry the MIT licence for commercial and proprietary apps while preserving copyright and licence notices (see LICENSING.md). SDK use is separate from QR Code AI’s paid creation plans and seven-day Premium trial.