This is example project of how to use opencv with flutter::ffi utilities based on the tutorial in the blog post:
"Implementing a Flutter plugin with native OpenCV support via dart::ffi โ Part 1"
"Implementing a Flutter plugin with native OpenCV support via dart::ffi โ Part 2"
brew install cmake
brew unlink cmake && brew link cmake
export ANDROID_HOME=/Users/$USER/Library/Android/sdk
export ANDROID_NDK_HOME=$ANDROID_HOME/ndk-bundle
export ANDROID_NDK=$ANDROID_NDK_HOME
export NDK=$ANDROID_HOME/ndk/23.0.7599858
Here 23.0.7599858 could be any version > 23.0.75..
This will take some big amount of time cause we need to build opencv for ios and android for ALL architectures
cd src
sh prebuild.sh
This script will prepare ios framework
file that will contain all c++ code. It also should be applied each time you change c++ code and need to check it or iphone
cd src/ios
sh build.sh