Flutter on Windows: how to call an external dll?
795
I was also digging this theme for quite a while. I was able to find following infomation:
- Each platform requires different way of C/C++ dynamic/static libraries integration, thus it won't be possible to simply add '.dll'/'.so'/etc to, say, '/assets' folder
- To include dynamic library in Ios and Android flutter project you have to make several changes in 'ios'/'android' folders respectively
You can try out those materials, they might help you:
- Integrating C library in a Flutter app using Dart FFI
- Calling Native Libraries in Flutter with Dart FFI
Author by
魔咔啦咔
Updated on December 19, 2022Comments
-
魔咔啦咔 over 1 year
Example: I want to call
libffmpeg.dll
in flutter-windows-app. Where should I put thelibffmpeg
, make it could be packed inrelease
anddebug
app, so i just useffi.DyncamicLibrary.open('libffmpeg.dll')
to call the native functions ? Should i need to change thewindows
indrectory? and how to achieve it?