This Flutter plugin demonstrates how to use OpenCV and ZXing C++ libraries natively in Flutter with Dart FFI using the camera stream.
- Uses OpenCV v4.7.0 C++ library to process the camera stream
- Utilizes ZXing v2.0.0 C++ library to scan more than 15 barcode types
- Implements Dart FFI to access the native libraries.
- Utilizes ffigen to generate FFI bindings
- Works on Android and iOS
To build and run the project, follow these steps:
- Download the required versions of the OpenCV and ZXing libraries and install them.
Note: The project useswget
to download the libraries from the command line.
If you're on macOS, you can use Homebrew to installwget
:
brew install wget
- On macOS, run the init.sh script:
sh init.sh
On Windows, run the init_windows.ps1 script:
.\init_windows.ps1
By following these steps, you will have the necessary dependencies installed and the project ready to be built and run on both Android and iOS devices.
MIT License. See LICENSE.