scan
1.6.0, released 5 years ago by chavesgu.com
Scan QR codes and barcodes within the widget tree and decode images from file paths.
What it does
Provides a ScanView widget to scan QR codes and barcodes directly from the camera feed with custom styling options. Also allows decoding QR codes and barcodes from image file paths programmatically.
AI-written summary of version 1.6.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to embed a QR or barcode scanner inside a custom widget layout.
- You need to decode QR or barcode data from an existing image path on the device.
Skip it when
- You want to generate QR code images (use qr_flutter instead).
Strengths
- Customizable scan area scale and scan line colors.
- Supports decoding barcodes and QR codes from image paths.
- Includes torch toggle and pause/resume controller functions.
Weaknesses
- Requires platform-specific configuration for camera usage on iOS and Android.
- Limited to scanning and parsing functionalities.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Requires adding NSCameraUsageDescription and io.flutter.embedded_views_preview to iOS Info.plist, and the CAMERA permission to the Android Manifest.
ScanController controller = ScanController();
Container(
width: 250,
height: 250,
child: ScanView(
controller: controller,
scanAreaScale: .7,
scanLineColor: Colors.green.shade400,
onCapture: (data) {},
),
);Alternatives
Packages that do the same job and could replace scan.
- mobile_scanner
Alternative package for scanning QR codes and barcodes from the camera.
95Compare - google_mlkit_barcode_scanning
Alternative solution using Google ML Kit for on-device barcode and QR code scanning.
94Compare