Repository navigation
Releases: flutter/packages
Releases · flutter/packages
Release list
pigeon-v29.0.4
[pigeon] Fix NSnumber edge cases and null value bug (#12997) Fixes https://github.com/flutter/flutter/issues/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.