qr_barcode_scanner 0.12.3
qr_barcode_scanner: ^0.12.3 copied to clipboard
Scan QR codes and barcodes locally from images or camera frames, with versioned reports and QR scannability diagnostics from the native Rust engine.
Unreleased #
- The package builds for Android with Gradle 9, which Flutter 3.50 requires
(at least AGP 9.1.1 and Gradle 9.3.1). Gradle 9 removed
Project.exec(), which the vendored cargokit called twice, so up to 0.12.2 the build of an app on Gradle 9 stopped on the taskcargokitCargoBuildQrcode_ai_scanner<Variant>withCould not find method exec().cargokit/gradle/plugin.gradlenow runs both commands through Gradle'sExecOperationsservice, a local patch thatcargokit/READMEdescribes. Apps on AGP 8 with Gradle 8 build as before. With AGP 9, the app keepsandroid.newDsl=falseinandroid/gradle.properties, which Flutter 3.50's template sets. No Rust source and no Dart API changes.
0.12.2 #
- The bundled engine is 0.12.2. A scan does the same work in less time: an
attempt that would hand the readers the bytes of an earlier attempt takes
that attempt's result, and three loops that run once per pixel spend fewer
cycles. Reports do not change, durations aside, and
versions.score_contractstays 6. - Calls written for 0.12.1 compile and behave as before.
0.12.1 #
- The bundled engine is 0.12.1, whose reports carry
versions.score_contract- The correction margin of a QR code (
score.uec) is measured in the image: one design keeps one margin at every size, and a QR code that only one of the two readers decodes now has a margin and its cap. A linear barcode in a frame wider than 512 px is judged at its own width, so a long Code 128 no longer scores a few points. Scores move in both directions; the decoded contents do not change.
- The correction margin of a QR code (
PipelineTrace.formatslists the symbologies a scan was restricted to. It isnullfor every scan this package starts:scanandscanFramedo not take the engine'sformatsoption yet.- Calls written for 0.12.0 compile and behave as before.
0.12.0 #
QrcodeAiScanner.scanandscanFrametake an optionalbudgetMs, the wall-clock budget in milliseconds, with the semantics ofbudget_msin the other bindings:nullkeeps the profile's default,0is unbounded, and a value above 4294967295 throws[QRS-006]before the image is read. A negative value throws aRangeError. Calls written for 0.11.0 compile and behave as before.- Debug builds of the Rust core are optimized. Simulators and emulators run
Flutter only in debug mode, where cargokit builds the core with Cargo's dev
profile, and 0.11.0 left that profile unoptimized: on the iOS simulator,
scans overran their default budgets.
rust/Cargo.tomlnow gives the dev profile opt-level 3 without debug assertions. Overflow checks stay on, and there is no LTO in debug builds. The README gives the CI timings on an Android emulator and an iPhone simulator: under the default budgets,fullwas final in every run andframein all but one, whilefastwas cut in most runs. flutter_rust_bridgemoves from 2.12.0 to 2.13.0: the Dart runtime, the Rust crate and the generated bindings together. Its Dart package requires Dart 3.9.2, so this package now declares Dart>=3.9.2 <4.0.0and Flutter>=3.35.3, the first Flutter that bundles it.- The package metadata names the renamed repository,
qrcode-ai-com/qrcode-barcode-scanner-rust: the pubspecrepository, the podspechomepageand the Rust crate'srepository. - The example app bundles the mixed QR/Code 128 fixture. Its integration tests
check that the three profiles read both codes, log each scan's time, and
exercise
budgetMs. Thefulldefault budget must not cut the scan. A cutfastorframescan is recorded and must be a valid partial report, unless--dart-define=QRSCAN_STRICT_BUDGETS=truemakes those budgets a test too, for a run on a physical device. - The package ships
rust/cargokit.yaml, with the public key8ea82880c3705d58f169159c4bb0d665d0a421cb1a84f94ef5178459e279695f: an app's build can download a signed precompiled native library and verify it with that key instead of compiling the Rust core. It compiles the core as before when no valid signed library is available (README, "Signed precompiled libraries"). The owner publishes the libraries of each release inprecompiled_<crate hash>before its pub.dev upload. - The example app shows the report: it scans the mixed QR/Code 128 fixture or
a single QR code with the profile and the optional
budgetMsyou choose, lists every detection with its format and text, shows the QR scannability score and grade of the first one when the report has them, outlines each code on the image, and showstrace.totalMsandtrace.budgetExhausted. - The pubspec declares a pub.dev screenshot of the example,
doc/screenshots/example-android.png, captured after a scan on an Android emulator in CI. Staging andscripts/package-inspect.pyrefuse a declared screenshot that pub would not publish, that breaks pub.dev's limits or is not the image its name says, and any undeclared file underdoc/screenshots.
0.11.0 #
- Publish the Flutter binding under the package name
qr_barcode_scanner. - Bundle the Rust scanner core at 0.11.0 so Android and iOS builds use the same engine and can decode a QR code and a Code 128 barcode in one image.
- Expose the typed scan report, including payload details, barcode occurrences and QR quality diagnostics.
0.4.0 #
- Initial Flutter/Dart binding (flutter_rust_bridge v2) for
qrcode-ai-scanner. QrcodeAiScanner.scan(bytes, profile:)+scanFrame(rgba, w, h, profile:)— the same canonical surface as the Python / Node / WASM / Kotlin / Swift bindings.- Fully typed
ScanReport(typedPayload/Hintsealed classes, ISO 15415 / UEC grade cards) that tolerates unknown enum values and payload kinds. - Android (cargokit/NDK) + iOS (cargokit/static lib) build-at-app-time.
