r/FlutterDev • u/ObjectiveAddress3051 • 14d ago
Plugin Anyone migrating plugins to Pigeon's native interop (FFI/JNI) yet?
Flutter's stable-native-interop post landed last week, and I'm curious how plugin maintainers are approaching it in real codebases.
What's actually stable now
- FFIgen for C and Objective-C
- JNIgen for Java/Kotlin (Android system APIs + your AARs/JARs)
What's preview
- Pigeon with native interop (
swiftOptions: SwiftOptions(useFfi: true),kotlinOptions: KotlinOptions(useJni: true)) - Skips the platform-channel serialization path; synchronous calls + background isolates become realistic
Docs point to shared_preferences as a reference migration — migration guide + an AI-oriented "native interop migration skill" for agents.
Questions for the room
- Are you starting new plugins on Pigeon+interop, or only migrating hot paths?
- Windows/Linux still channel-based — does that split your public API design?
- What broke for you? (build hooks, app directory for JNIgen, object lifetimes?)
I'm especially interested in plugins that were already Pigeon-clean — was the move "flip flags + rebuild" or a week of yak shaving?
Links:
15
Upvotes
1
u/TesteurManiak 6d ago
I've used it for a package I've made that wraps Nearby Connections' API: https://github.com/TesteurManiak/native_nearby_connections
The Flutter team has published some documentation on how to migrate your pigeon's configuration: https://github.com/flutter/packages/blob/main/packages/pigeon/native_interop_guide.md
0
u/_ri4na 13d ago
Looks like no one bothers with this