Seamless Interoperability: Harnessing JNIGen and FFIGen
summary
Shows concrete bridges between Flutter and native code: method and event platform channels for simple calls like battery level, a camera/AR demo that accesses native permissions, and Pigeon generates type-safe Dart + Kotlin/Swift stubs from annotated APIs so you avoid handwriting handlers. Covers Dart FFI for C libraries, FFIgen using libclang to parse headers for iOS, and JNIgen produces intermediate C bindings for Android (experimental) that call Java via JNI so existing C C++ Rust or Java code becomes callable from Dart.
AI-written summary · about
chapters (12)
- 0:00Introduction and interoperability
- 4:44Flutter architecture overview
- 6:08Advantages of native APIs
- 8:15Platform channels explained
- 15:35Pigeon package introduction
- 19:27Limitations of method channels
- 20:09Foreign function interface basics
- 22:16FFIgen and JNIgen overview
- 23:42JNIgen implementation steps
- 27:56Choosing the right tool
- 29:41Conclusion and tools summary
- 30:45Closing and Fluttery Stars conference
related talks
30mBinding Native Plugins with Flutter and Dart
14mC interoperability with Dart FFI
39mAdopting native assets for cross-platform FFI plugins
37mUsing Dart FFI for Compute-Heavy Tasks in Flutter Apps
36mUsing Dart FFI for Compute-Heavy Tasks
36mFlutter Plugins - From Method Channels to Native Interop
50mPast, Present and Future of Native Interop
43mSummit Session 2 - Past, Present and Future of Native Interop
