NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #471 most downloaded on pub.dev
Code generator tool to make communication between Flutter and the host platform type-safe and easier.
Last release today
07 Oct 2026
Ships fairly regularly
a new release about every 2 weeks
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
271 releases · first in 2020
One column per quarter.
[pigeon] Fix native interop (JNI) calls in minified Android release b…
[pigeon] Fix native interop (JNI) calls in minified Android release b…
ClassNotFoundException in minified
Android release builds, by adding @Keep to every generated class that JNI reaches by name.package:jni looks up by name.Updates native interop guides and migration skill with SwiftPM _objc_gen target guidance.
<plugin_name>_objc_gen target guidance.dev_dependencies (ffigen, jnigen, swift2objc, and swiftgen).[dart] Fixes JNI typed data arrays being backed by native memory that is freed when the isolate that read them exits.
jnigen 1.0.0 and
current tooling requirements.[pigeon] Fix NSnumber edge cases and null value bug
[pigeon] Fix NSnumber edge cases and null value bug (#12997)
Fixes flutter/flutter#193266
Fixes two Swift FFI value serialization bugs in `SwiftGenerator`:
1. **`CFBoolean` and floating-point `NSNumber` bridging in `wrapNumber`**: When an Objective-C boolean (`__NSCFBoolean` / `CFBoolean`) or a whole-number floating-point `NSNumber` (such as `3.0` returned from `UserDefaults.object(forKey:)` or `NSDictionary`) is boxed inside `Any`, Swift's dynamic `as? Int` cast succeeds before reaching `case let value as Double:` or `case let value as Bool:`. `wrapNumber` now checks `CFGetTypeID(number as CFTypeRef) == CFBooleanGetTypeID()` (`type: 3`) and `CFNumberIsFloatType(nsNumber)` (`type: 2`) prior to switching on numeric types, matching `FlutterStandardCodec` behavior.
2. **Dictionary value `isNullish` check in `writeValue`**: Fixes a typo in `writeValue` where dictionary serialization checked `isNullish(key)` instead of `isNullish(value)` when serializing dictionary values.
Fixes https://github.com/flutter/flutter/issues/<ISSUE_NUMBER>
## Pre-Review Checklist
**Note**: The Flutter team is currently trialing the use of [Gemini Code Assist for GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code). Comments from the `gemini-code-assist` bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
[^1]: Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling.
CFBoolean and floating-point NSNumber values.isNullish on the key instead of the value.[swift] Uses isNullish to check for null and NSNull in non-null Flutter API returns.
isNullish to check for null and NSNull in non-null Flutter API returns.[swift] Fixes a crash when a Flutter API returns null for a non-null return value and the null arrives as NSNull.
NSNull.adds main actor annotation to async flutter api methods in swift.
adds main actor annotation to async flutter api methods in swift.
fixes flutter/flutter#192199
This PR introduces optional Native Interop to Pigeon, enabling direct communication between Dart and native code without the overhead of traditional M
This PR introduces optional Native Interop to Pigeon, enabling direct communication between Dart and native code without the overhead of traditional MethodChannel serialization. It leverages FFI (Foreign Function Interface) for Swift (iOS/macOS) and JNI (Java Native Interface) for Kotlin (Android).
This represents a significant architectural shift, moving from message-based passing to direct memory sharing and function calls. It also updates the concurrency model for asynchronous methods, moving from completion handlers/callbacks to modern language features: async/await in Swift and Coroutines in Kotlin.
Generators Covered
Swift Generator: Updated to support FFI bindings and async/await for asynchronous methods.
Kotlin Generator: Updated to support JNI bindings and Kotlin Coroutines for asynchronous methods.
Dart Generator: Updated to handle the generated interop bindings on the Dart side.
What's In Scope
What's Out of Scope
work toward flutter/flutter#182230
design doc flutter/flutter#181430
fixes flutter/flutter#164297
fixes flutter/flutter#164297
swiftOut and --swift_out.Adds support for modern async method styles in swift and kotlin. This is now the default. Also adds a new annotation AsyncCallback that reverts to the
Adds support for modern async method styles in swift and kotlin. This is now the default. Also adds a new annotation AsyncCallback that reverts to the old style.
precursor to #11352
suspend functions and async signatures for @FlutterApi methods by default, and for @HostApi methods annotated with @async.
@asyncCallback if callback-style signatures are required.Part of fixing flutter/flutter#183945 .
Part of fixing flutter/flutter#183945.
Regenerating pigeon files will fix issue.
Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.
Updates analyzer dependency to support versions 13 and 14.
analyzer dependency to support versions 13 and 14.Adds support for sharing constants across platforms.
Adds support for empty data classes.
Reports a clear error when an input file uses an enhanced enum (one with a constructor, fields, methods, or arguments on its values), instead of silen
[dart] Adds usage documentation to generated event channel methods, and emits the user's documentation comments on them.
[swift] Adds CaseIterable conformance to generated enums.
CaseIterable conformance to generated enums.Breaking Change Overrides toString (or equivalent) methods on generated data classes
toString (or equivalent) methods on generated data classes
description implementations in Swift.isNullish to handle double nested Any? values.[kotlin] Updates generated error class to inherit from RuntimeException instead of Throwable, for better Java interoperability.
RuntimeException
instead of Throwable, for better Java interoperability.Updates analyzer dependency to support versions 10 through 12.
analyzer dependency to support versions 10 through 12.Updates analyzer dependency to support version 10.
analyzer dependency to support version 10.Fixes dartdoc comments that accidentally used HTML.
Optimizes and improves data class equality and hashing.
Produces a helpful error message when a method return type is missing or an unsupported type, such as a function type or record type.
[dart] Improves nullability-handling in generated code.
[kotlin] Adds option to add javax.annotation.Generated annotation.
Dramatically reduces the number of File write operations sent to the operating system during code-generation. This improves performance of IDEs and th
[dart] Reduces much duplication in reply-handling code.
Makes some internal class constructors constant.
[objc] Updates to use module imports.
[kotlin] Fixes a "bridge method" warning when implementing an event stream handler.
[swift][kotlin] Fixes crash that occurs when an object that is removed from the instance manager calls to Dart.
[dart] Fixes error from constructor parameter sharing name with attached field for a ProxyApi.
[kotlin] Fixes compilation error with unbounded type parameter for InstanceManager.
Updates supported analyzer versions to 8.x or 9.x.
analyzer versions to 8.x or 9.x.Deprecates dartHostTestHandler and dartTestOut.
dartHostTestHandler and dartTestOut.
[kotlin] Serialize custom enums as Long instead of Int to avoid ClassCastException on decoding.
Long instead of Int to avoid ClassCastException on decoding.Adds compatibility with analyzer 8.x.
analyzer 8.x.[kotlin] Removes all containsKey and replaces with contains.
containsKey and replaces with contains.[kotlin] Fixes support for classes that override equals and hashCode for ProxyApis.
Improves documentation of ProxyApi annotation and internal Dart ProxyAPI helper functions.
ProxyApi annotation and internal Dart ProxyAPI helper functions.Breaking Change [dart] Changes name of constructors used to create subclasses of ProxyApis to pigeon_original_name.
pigeon_**original_name**.[dart] Changes the default InstanceManager and its initialization to no longer make a message call when used in a Flutter unit test.
[gobject] Adds type id constants in header files so that they can be used by the user.
[dart] Fixes null pointer crashes/exceptions caused by premature finalization of Dart instances for ProxyApis.
[kotlin] Fixes Kotlin InstanceManager not properly removing callbacks from handler.
SyntheticAccessor lint caused by private utility methods.[swift] Adds equality methods to generated data classes.
[kotlin] Adds equality methods to generated data classes.
[dart] Adds equality methods to generated data classes.
Breaking Change Removes oneLanguage field from PigeonOptions.
oneLanguage field from PigeonOptions.mergeDefinitionFileOptions parameter to runWithOptions method.injectOverflowTypes to non-public facing method.Updates compileSdk 34 to flutter.compileSdkVersion.
[dart] Fixes potential race condition caused by a ProxyApi constructor message call being made in an async method.
Adjusts task queues to use a shared task queue for all methods in a single API instance, to give the same ordering guarantees as non-task-queue usage.
[swift, kotlin] Adds an error message when a ProxyAPI callback method that returns a non-null value is nullable.
ProxyApiBaseCodec when an instance could not be
retrieved when reading a value.[kotlin, swift] Adds annotation options to omit shared classes used in Event Channels.
Breaking Change Relocates some files in lib that were not intended for direct client use to lib/src.
lib that were not intended for direct client use to lib/src.Breaking Change [swift] Fixes a compile error about PigeonError's sendability conformance in Swift 6.
[dart] Fixes bug with multi-instance event channel support.
Adds compatibility with analyzer 7.x.*.
analyzer 7.x.*.Updates README to discuss best practices for using Pigeon-generated code.
Your coding agent can read these notes before it upgrades. Set up the MCP server →