Binding to native macOS code using dart:ffi

Platform integration

macOS

Binding to native macOS code using dart:ffi

Dynamic vs static linking

Step 1: Create a plugin

Step 2: Add C/C++ sources

Step 3: Load the code using the FFI library

Other use cases

iOS and macOS

Platform library
First-party library
Source code
Compiled (dynamic) library
Compiled (dynamic) library (macOS)

Flutter mobile and desktop apps can use the
dart:ffi library to call native C APIs.
FFI stands for foreign function interface.
Other terms for similar functionality include
native interface and language bindings.