flutter_zxing
3.1.1, released 12 days ago by an unverified publisher
Barcode and QR code scanner and generator using Dart FFI and ZXing C++.
What it does
Scans single or multiple 1D and 2D barcodes from camera streams, local files, URLs, or raw pixel bytes, and generates custom QR codes and barcodes. Built with native Dart FFI bindings to the ZXing C++ library.
AI-written summary of version 3.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need high-performance barcode and QR code scanning in a Flutter application.
- You need to generate custom QR codes or barcodes and export them as images.
- You require support for multiple barcode formats on mobile and desktop platforms.
Skip it when
- You are targeting the web platform, which is not supported due to Dart FFI limitations.
- You do not want to manage native dependencies or C++ integration setups.
Strengths
- High performance powered by the ZXing C++ library via Dart FFI.
- Supports a wide range of linear and matrix barcode formats for reading and writing.
- Provides convenient built-in UI widgets like ReaderWidget and WriterWidget.
Weaknesses
- Not supported on the web platform.
- Desktop camera support requires additional setup like camera_desktop.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 4
Requires platform-specific camera permissions (e.g., NSCameraUsageDescription on macOS/iOS) and extra configuration for desktop camera streams.
ReaderWidget(
onScan: (result) async {
// Do something with the result
},
)Alternatives
Packages that do the same job and could replace flutter_zxing.
- mobile_scanner
Alternative barcode scanner plugin leveraging platform-native scanning APIs.
95Compare - google_mlkit_barcode_scanning
Uses Google's ML Kit for on-device barcode scanning without relying on FFI.
94Compare - qr_flutter
Dedicated pure-Dart QR code generation widget without native dependencies.
50Compare
Works with
Packages commonly used together with flutter_zxing: ones it builds on, ones built on it, and its own family.
- ffiflutter_zxing depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- imageflutter_zxing depends on itPure Dart library to load, manipulate, encode, and decode various image formats.
- image_pickerflutter_zxing depends on itFlutter plugin for selecting images/videos from the gallery and capturing new ones via camera.
- cameraflutter_zxing depends on itFlutter plugin to preview, capture photos/video and stream camera images.