C interoperability with Dart FFI
summary
Shows how to call C from Dart by following the three explicit steps: open the dynamic library, look up the symbol, call it, and handle C memory. Demonstrates automatic binding generation with FFI GEN, wraps the generated C API for SQLite in an idiomatic database class, and wires that to a Flutter Veggies app search page so queries run against a real SQLite DB and the search works.
AI-written summary · about
chapters (13)
- 0:00Intro
- 1:47Call C function from Dart
- 5:00Manage C memory
- 5:33C features
- 5:59Sample app
- 6:38Database
- 7:15FFIGen
- 8:14Dart API
- 8:55idiomatic Dart API
- 10:54Demo code
- 11:24Recap
- 11:53What is Dart FFI
- 12:41Using Dart FFI
related talks
31mSeamless Interoperability: Harnessing JNIGen and FFIGen
37mUsing Dart FFI for Compute-Heavy Tasks in Flutter Apps
37mUsing Dart FFI for Compute-Heavy Tasks
39mAdopting native assets for cross-platform FFI plugins
36mUsing Dart FFI for Compute-Heavy Tasks
47mFlutter, FFI and Fun: Windows Development with Dart and Win32
28mUsing Rust in your next Flutter SDK
30mBinding Native Plugins with Flutter and Dart
