- Create new flutter plugin with --platforms=android,windows --template=plugin_ffi
- Delete src/*.c and src/*.h
- Delete src/CMakeLists.txt and copy flutter_cgo/CMakeLists.txt to src
- Cd src,execute go init mod and create go c-shared project
- Add custom targets to android/build.gradle
defaultConfig { externalNativeBuild { cmake { targets "shared_go_lib" } } }
- Open the project and debug
imcdd / flutter-cgo Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License