NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev, #464 most downloaded on pub.dev
Code generator tool to make communication between Flutter and the host platform type-safe and easier.
Latest stable
30.0.4
Last release 4 days ago
17 Nov 2026
Release timing varies
gaps range from 8 days to 2 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
285 releases · first in 2020
Drag across the ruler to compare, or tap a release to open it.
[pigeon] Stop silently skipping JNIgen when env vars are unset and su…
[pigeon] Stop silently skipping JNIgen when env vars are unset and su…
jnigen when ANDROID_HOME / ANDROID_SDK_ROOT or JAVA_HOME are unset, and surfaces jnigen errors and troubleshooting hints on stderr without aborting remaining generation steps.Removes the remaining unused dart:mirrors imports and dead code from pigeon :
Removes the remaining unused dart:mirrors imports and dead code from pigeon:
isVoid(TypeMirror) and import 'dart:mirrors'; from lib/src/generator_tools.dart._executeConfigurePigeon and import 'dart:mirrors'; from lib/src/pigeon_lib.dart (legacy pre-0.3.0 reflection-based configuration, superseded by @ConfigurePigeon AST parsing).PigeonIsolate / dart:mirrors section from CONTRIBUTING.md.Split out from #13253.
Fixes flutter/flutter#190228
Your coding agent can read these notes before it upgrades. Set up the MCP server →
dart:mirrors usage.[pigeon] Fix basePath resolution when paths share a string prefix wit…
[pigeon] Fix basePath resolution when paths share a string prefix wit…
basePath resolution when an output or directory path shares a string prefix with basePath.[pigeon] Adds Native Interop FFI codec serialization for NS types ( #1 …
[pigeon] Adds Native Interop FFI codec serialization for NS types (#1…
Data, NSData, NSArray, and NSDictionary values.[pigeon] Support multi-engine Native Interop registration and instanc…
[pigeon] Support multi-engine Native Interop registration and instanc…
register and unregister take the engine the instance belongs to (a plugin binding or FlutterEngine in Kotlin, a registrar in Swift). Use unregister instead of register(null).@FlutterApi lookups take the engine (getInstance(binding) / getInstance(registrar:)) instead of a name, and the native @HostApi getInstance(name) is removed.@HostApi implementations must be classes.PlatformException instead of crashing.[pigeon] Pass data classes and collections in a single buffer per nat…
[pigeon] Pass data classes and collections in a single buffer per nat…
List, Map and Object values
of Kotlin JNI and Swift FFI calls in one buffer per call instead of making a
call across the language boundary for every field and collection element,
making calls with large data classes and collections many times faster while
keeping scalars, strings, enums and typed data direct.ofRaw constant time.Updates README to label Native Interop as Preview and warn about multi-engine @HostApi registrations.
@HostApi registrations.The existing static register method is kept to avoid unnecessary breaking changes, but clients no longer need to use it if they want to create the cha…
Adds a new class for each event channel API that wraps the underlying EventChannel and allows setting the stream handler, matching the underlying Flutter API. This allows clients that need to set a new handler later (notably, removing a handler to avoid an engine-lifetime reference to a handler for a transient channel) to do so, using the same API that non-Pigeon event channel code would use.
The existing static register method is kept to avoid unnecessary breaking changes, but clients no longer need to use it if they want to create the channel directly.
Fixes flutter/flutter#195049
register.[pigeon] Separate native interop Dart bindings into a conditionally i…
[pigeon] Separate native interop Dart bindings into a conditionally i…
*.native_interop.g.dart) so that the main generated Dart file can be imported on Web without pulling in dart:ffi or dart:io.[pigeon] update jni dependency to ^1.1.1 and remove workaround progua…
[pigeon] update jni dependency to ^1.1.1 and remove workaround progua…
jni version constraint in pubspec.yaml allows versions below 1.1.1.jni dependency to ^1.1.1 and removes manual Kotlin keep rules from native interop guides and migration skill now that package:jni includes them.[pigeon] add version checking for objective_c and jni dependencies (#…
[pigeon] add version checking for objective_c and jni dependencies (#…
objective_c version constraint in pubspec.yaml does not match the generated ObjCVersionCheck.jni version constraint in pubspec.yaml does not match the generated JniVersionCheck.fixes broken generation and unblocks sealed classes for native interop. Forward work for event channels
fixes broken generation and unblocks sealed classes for native interop. Forward work for event channels
[pigeon] Replace full JNI bindings with stubs for API classes that ar…
[pigeon] Replace full JNI bindings with stubs for API classes that ar…
.jni.dart file.[pigeon] Reject unsupported native interop features and fix generated…
[pigeon] Reject unsupported native interop features and fix generated…
NSObject members, host API parameters named wrappedError, and
includeErrorClass: false.@asyncCallback methods, @SwiftFunction overloads, methods named type,
parameters named error, and multiple FFI files in the same module.fileSpecificClassNameComponent that isn't
UpperCamelCase or is set only in SwiftOptions, and Dart test files.signIn, or first parameter and field names that
start with one, like forKey.[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.One column per quarter.