Calling C/C++ from Flutter - Richard Heap (Flutter Week)
Why Stack Overflow recommends it
Stack Overflow users link it when answering how to use C++ libraries from a Flutter app, since it is a worked end-to-end dart:ffi example.
Recommended by 3 people across 3 different months, 2019 to 2023.
What it is
A Flutter Week talk by Richard Heap on calling C and C++ code from Flutter apps using dart:ffi. He walks through creating a dart:ffi plugin, editing the native code in Xcode or Android Studio, defining the Dart-to-C bindings, and testing on iOS and Android, using a libresample example.
What people said
Recommends Xavier Rubio Jansana · 2019-03 · Stack Overflow · on “how to use c++ code in flutter (android) application?”
Additional information (2021-05-05) From @FacundoFarall comment to the original question: Try this video [this video] by Richard Heap, it helped me quiet a lot. He explains with an example how to interact between the Dart code of your Flutter app, and the C++ library you're using, all through dart:ffi. I'd also recommend checking out this post [LINK] for a way to debug the C++ code while running it through a Flutter app. Update (2019-09-10) Today has been released Dart 2.5 [LINK] (and Flutter 1.9). One of the additions to Dart 2.5 is "the dart:ffi foreign function interface for calling C code directly from Dart." I still haven't checked it, but it should provide a more direct path to interface wi
Recommends Facundo Farall · 2020-06 · Stack Overflow · on “how to use c++ code in flutter (android) application?”
Try this video [this video] by Richard Heap, it helped me quiet a lot. He explains with an example how to interact between the Dart code of your Flutter app, and the C++ library you're using, all through ```dart:ffi```. I'd also recommend checking out this post [LINK] for a way to debug the C++ code while running it through a Flutter app.
Recommends Richard Heap · 2023-10 · Stack Overflow · on “How can I use the ffi package to use c++ in my flutter app?”
If you have 56 minutes, consider watching [this video] You might find that you could wrap mediapipe in a similar way to oboe. Though why wouldn't you use the Android and iOS versions through a regular plugin?
Cites Facundo Farall · 2020-06 · Stack Overflow · on “Accessing assets from C++ plugin through Flutter”
I'm trying to use Google Oboe for a 3D audio processing app due to it's low latency. The app will have a C++ backend, which does the processing, and the frontend is done with Flutter. I'm running a couple of tests to see if it'll work but I'm having issues loading assets from Flutter to Oboe. I checked the example RhythmGame in Oboe's repo [LINK] , done with Java, but couldn't quiet find a way of doing that straight from Dart to C++. The connection between front and backend is through dart::ffi [LINK] Here's what I've tried so far. Based on the example published by Richard Heap here [this video] , I changed the noise variable from just a sine wave to a short fragment of a song in a wav file: clas