I'm very new to flutter. I'm trying to send an image from my OpenCV-C++ code to flutter for iOS device through dart:ffi.
I first converted cv::Mat to vector. I'm not sure if this is a right approach.
Still, I'm stuck at how to define lookup function. My image processing function in C++ return a vector of unsigned char. Below is my current lookup function. It debugs without errors but it crashes when I call this function in flutter.
final Pointer<Uint8> Function() imageProcess = nativeAddLib
.lookup<NativeFunction<Pointer<Uint8> Function()>>('image_process')
.asFunction();
How should I send cv:Mat (or vector) from C++ to flutter?