zp_qr_scanner 1.3.0
zp_qr_scanner: ^1.3.0 copied to clipboard
A high-performance Flutter QR scanner plugin powered by native camera textures on iOS (AVFoundation) and Android (CameraX + ML Kit).
1.3.0 #
- Added
ZpQrScanner.stopScan()/resumeScan()/isScanningto pause and resume QR detection while keeping the camera preview running. - Added
ZpQrScanner.restart()to recover a stuck camera: checks whether the camera is actually showing a fresh frame and restarts the session only if it isn't. QrScannerViewnow reacts toZpQrScanner.isScanningand to texture changes fromrestart(), so both are safe to call from outside the widget that created it.restart()now throwsPlatformException(code: 'not_started')instead of silently turning the camera back on if it is called beforestart()or afterstop(), and keeps the previousisScanningstate across a "slow" restart (one that has to recreate the camera) instead of always re-enabling detection.
1.2.0 #
- Android: sharper scanning of small QR codes held close to the camera.
- Continuous autofocus is forced and prioritized on the center of the frame instead of the whole scene.
- Tap-to-focus keeps continuous autofocus instead of locking focus; focus returns to the center after 5 seconds.
- The camera may start slightly zoomed in (up to
2.0) so the phone stays beyond the lens minimum focus distance, like iOS devices with a single wide lens. - Auto exposure is locked to 30 fps when supported to reduce motion blur.
- Devices without focus-area support fall back to CameraX tap-to-focus with a 2-second lock.
1.1.3 #
- Added camera zoom.
ZpQrScanner.setZoom(scale)sets the zoom level (e.g.1.0,2.0,3.0), clamped toZpQrScanner.minZoom..ZpQrScanner.maxZoom, and returns the applied level.ZpQrScanner.zoomis aValueListenable<double>with the current level.1.0is the main (wide) lens;minZoomis below1.0on devices with an ultra-wide lens;maxZoomis capped at10.0.
QrScannerViewsupports pinch-to-zoom with two fingers (enablePinchZoom, defaults totrue).- Example app: 1x / 2x / 3x zoom selector.
1.1.2 #
- Added
scanBoxAlignmentandscanBoxOffsettoQrScannerViewto position the idle scan frame (defaults to center, backward compatible).- The frame pulses around a fixed center, and the detection animation starts from the new position.
- Example app: tap "Vị trí khung" to cycle the frame position.
1.1.1 #
- iOS: sharper camera preview and reliable continuous autofocus.
- Captures at 1080p (falls back to 720p when unsupported).
- Prefers the triple / dual-wide virtual camera so the system switches to the ultra-wide (macro) lens when a QR code is very close; on single-lens devices the zoom compensates for the lens minimum focus distance.
- Tap-to-focus keeps continuous autofocus instead of locking focus; focus returns to the center when the scene changes.
- Locked to 30 fps and capped exposure time to reduce motion blur in low light.
- Camera texture is rendered with
FilterQuality.medium.
1.1.0 #
- Added Android support (CameraX + bundled ML Kit,
minSdkVersion21).- Camera frames are drawn to the Flutter texture by the plugin itself, so the frozen frame matches the reported QR corners exactly.
- Runtime camera permission, torch and tap-to-focus support.
- The QR model is bundled, so scanning works without Google Play Services (adds ~3.9 MB on arm64).
- Synced the iOS podspec version with the package version.
- README: Android setup and app size impact.
1.0.2 #
- Version bump only, no functional changes.
1.0.1 #
- Added pulsing breathing animation for the 4 scanning corners in idle state.
- Smooth color transition from white to yellow when QR code is detected.
- Adaptive corner sizing: corner length, stroke width, corner radius, and padding now dynamically scale based on the detected QR code size.
- Revamped example app UI with realistic scanner overlays and bottom sheet result.
1.0.0 #
- Initial stable release.
- High-performance iOS QR and barcode scanning with native camera textures (
Texturewidget). - Real-time QR corner tracking and scan line animations.
- Built-in torch (flashlight) and tap-to-focus support.
- Smooth, lag-free UI with background camera processing.