qr_code_dart_scan 0.14.0
qr_code_dart_scan: ^0.14.0 copied to clipboard
A QR code scanner that works on both iOS and Android using dart decoder.
0.14.0 #
Breaking: the models moved to qr_code_dart_decoder #
ScanResult and BarcodeFormat are now owned by qr_code_dart_decoder (0.3.0) and re-exported here, so both packages speak the same types and zxing_lib is gone from this package's dependencies. Importing from package:qr_code_dart_scan/qr_code_dart_scan.dart keeps working unchanged.
-
ScanResult.cornersis nowList<Point<double>>(dart:math) instead ofList<Offset>. The decoder is a pure Dart package and cannot depend ondart:ui. NewtoOffset/toOffsetsextensions bridge them:// before CustomPaint(painter: MyPainter(result.corners)); // List<Offset> // now CustomPaint(painter: MyPainter(result.corners.toOffsets)); // List<Offset> -
QRCodeDartScanDecoderno longer speakszxing_lib.decodeCameraImageanddecodeFilereturnScanResult?instead ofResult?, completing the migration started in 0.13.0.
Bug fix (from qr_code_dart_decoder 0.3.0) #
- Camera decoding now honours the
formatsyou pass toQRCodeDartScanView/QRCodeDartScanDecoder. The format list was accepted but never reached the reader, so live scanning could return a barcode in a format you had not asked for. If you were relying on that leak, widenformatsexplicitly.
0.13.0 #
Breaking: zxing_lib no longer leaks into the scanner API #
onCapture, onResultInterceptor and formats now use the package's own types, so apps do not need a zxing_lib dependency to consume them.
before (zxing_lib) |
now |
|---|---|
Result |
ScanResult |
BarcodeFormat |
BarcodeFormat (own enum, only the 10 supported formats) |
result.barcodeFormat |
result.format |
result.resultPoints (List<ResultPoint?>?) |
result.corners (List<Offset>, never null) |
result.timestamp (int millis) |
result.timestamp (DateTime) |
result.rawBytes (List<int>?) |
result.rawBytes (Uint8List?) |
result.numBitsandresult.resultMetadatawere dropped; nothing in the package used them.- Passing an unsupported format is now a compile error instead of a runtime
Exception. ScanResultkeeps identity equality on purpose, so scanning the same code twice still notifies.- The low-level
QRCodeDartScanDecoderstill speakszxing_libtypes; only the scanner layer was migrated.
0.12.2 #
- Lifecycle race fix: Fixed
CameraException(Disposed CameraController, startImageStream() was called on a disposed CameraController.)raised when the app was paused/resumed (or the scanner was popped) while the camera initialization was still in flight.- Camera setup/teardown is now serialized and guarded by a generation token: an initialization that gets invalidated aborts at its next
awaitand disposes the camera it created, instead of continuing against a dead controller. CameraController.value.isInitializedstaystrueafterdispose(), so the package now tracks the disposed state itself rather than relying on that flag.
- Camera setup/teardown is now serialized and guarded by a generation token: an initialization that gets invalidated aborts at its next
- Camera leak fix: An aborted or replaced initialization no longer leaves a native camera session open (also fixes leaks on
changeCamera). - Paused scan is preserved across the app lifecycle: if
stopScan()was called and the user minimizes and reopens the app, the camera preview is restored but the image stream is not restarted. UsestartScan()(orchangeTypeScan(TypeScan.live)) to resume, and the newisScanPausedgetter to query it. Mounting the view again resets it, so a reused controller never comes back mute;config()takes a newkeepScanPausedflag for the lifecycle case. QRCodeDartScanController.cameraControllernow returnsnullinstead of a disposed instance, and a newisInitializedgetter was added.- The controller can be safely reused after
dispose(): callingconfig()again re-arms it. - The view now registers its state listener only once instead of on every resume, and no longer calls
setStateafter being unmounted. - Fixed
changeTypeScan(TypeScan.live)never restarting the image stream. - Errors from
availableCameras(),takePicture()andsetFocusPoint()are now caught and reported throughonCameraErrorinstead of escaping to the zone.startImageStream()failures are the deliberate exception: they are reported throughonCameraErrorand re-surfaced to the zone, so they keep reaching crash reporting.
0.12.1 #
- Result points accuracy: Fixed
resultPointscoordinates to accurately match the QR code position in the camera preview. - Dynamic rotation handling: Automatically detects camera orientation (landscape/portrait) and applies the correct transformation.
- Bounding box generation: Result points now always form a perfect quadrilateral (4 corners) regardless of the number of points detected.
- Example enhancement: Added visual overlay in the example app to display detected QR code boundaries with lines and points.
0.12.0 #
- Performance improvements: Reduced scan interval default from 1s to 200ms (5x faster detection).
- Memory optimization: Update
qr_code_dart_decoderto0.2.0with major performance improvements:- Zero-copy data transfer between isolates (~4MB saved per frame)
- Y plane only processing (~1.5MB saved per frame)
- Memory leak fix in results list
- Block-wise image rotation (30-40% faster)
- Blur detection to skip unprocessable frames (20-30% CPU savings)
- Detection speed: Average detection time reduced from 2-3s to ~0.4-0.6s (5-7x faster).
- Decode optimization: Changed to
tryHarder: trueon first attempt for better success rate.
0.11.5 #
- Add image stream watchdog to detect and handle native camera errors when stream stops responding.
- Add
imageStreamTimeoutparameter to configure watchdog timeout (default 2 seconds).
0.11.4 #
- Fix issue
CameraException(Disposed CameraController, buildPreview() was called on a disposed CameraController.)
0.11.3 #
- Adds
focusPointinQRCodeDartScanViewto set the focus point for the camera preview.
0.11.2 #
- Performance improvements.
0.11.1 #
- Update
qr_code_dart_decoderto0.1.2.
0.11.0 #
- Adds
croppingStrategyinQRCodeDartScanViewto crop the image before decode. - Update
qr_code_dart_decoderto0.1.1. - remove
scanInvertedQRCodeinQRCodeDartScanView. Now it is always true.
0.10.1 #
- Little improvements in
QRCodeDartScanView. - Increment some dependencies
0.10.0 #
- Adds
lockCaptureOrientationdefault toDeviceOrientation.portraitUpinQRCodeDartScanView. - Decode improvements. Now it use package
qr_code_dart_decoder. - Adds
cropRectinQRCodeDartScanViewto crop the image before decode.
0.9.11 #
- Fix exception: CameraException(Uninitialized CameraController, startImageStream() was called on an uninitialized CameraController.);
0.9.10 #
- Adds
videoBitrateandfpsinQRCodeDartScanView.
0.9.9+1 #
- update README.md
0.9.9 #
- Adds
imageDecodeOrientationinQRCodeDartScanViewto force read image in landscape or portrait orientation.
0.9.8 #
- Rename param
forceReadPortraittoforceReadLandscape. Read image portrait by default. IfforceReadLandscapeis true, the image will be read in landscape mode, helpful to read itf code. - Fix IOS camera orientation.
0.9.7 #
- Adds
onCameraErrorinQRCodeDartScanView.
0.9.6 #
- Update dependencies.
0.9.4 #
- adds methods
toggleFlash,setFlash,setFlashAutoin QRCodeDartScanController.
0.9.3 #
- Fix
stopImageStreamexception.
0.9.2 #
- Adds method
stopScanandstartScaninQRCodeDartScanController. - Adds get
isLiveScan. - Fix
changeCameraexception.
0.9.0 #
- Camera key improvments
- Update camera pluggin to
0.11.0 - Performance improvements. Now using pool of isolates to process in live.
- Adds support to
itf.
0.8.3 #
- Fix camera preview scale.
0.8.2 #
- Remove debug prints
0.8.1 #
- fix app life circle issue 26. Thanks Ömral Cörüt !
0.8.0 #
QRCodeDartScanControllerImprovements- Adds
Future<void> changeCamera(TypeCamera typeCamera)method inQRCodeDartScanController. - Adds
intervalScanparam inQRCodeDartScanView. - Adds
onResultInterceptorparam inQRCodeDartScanView.
0.7.7 #
- Fix issue #18. Thanks MateusLucasDaSilva!
0.7.6 #
- Handle with
didChangeAppLifecycleState. - Fix issue #15. Thanks thierrylee!
0.7.5 #
- Update dependencies.
- Adds the method
disposeinQRCodeDartScanController
0.7.2 #
- Fix issue #7. Thanks so much philseeley!
0.7.1 #
- return
resolutionPresetdefault toQRCodeDartScanResolutionPreset.medium - removre debug prints.
0.7.0 #
- Update dependencies.
0.6.0 #
- Adds scan by picture
- Export decoder
- Improvements in
QRCodeDartScanController - Improvements in project structure
0.5.1 #
- fix problem camera dispose.
0.5.0 #
- update
camera. - update
zxing_lib. - update
image.
0.4.1 #
- update
camera - Adds param
resolutionPresetandchildinQRCodeDartScanView.
0.4.0 #
- update
camera,zxing_libandimage
0.3.0 #
- update
camerato 0.9.4+5
0.2.0 #
- update
camera - update
image.
0.1.1 #
- rename
scanQRCodeInvertedtoscanInvertedQRCode - improvements aspectRatio.
0.1.0 #
- add
setScanEnabledin controller. - add other formats:
QR_CODE,AZTEC,DATA_MATRIX,PDF_417,CODE_39,CODE_93,CODE_128,EAN_8,EAN_13.
0.0.2 #
- Improvements performance
0.0.1+1 #
- Update README
0.0.1 #
- First version