Upgrading ffigen 13 to 14
Breaking13.0.0 → 14.0.1Breaking5New3Changed1Fixed4
BreakingUpgrade verdict
5 breaking changes.
In plain terms
- If your config uses `assetId` for ffi-native, you must rename it to `asset-id`.
- Objective-C block parameters and returns now use a generic Dart type, and the old generated wrapper class is no longer constructible.
- You must enable Automatic Reference Counting for the generated Objective-C code, or it will not compile.
- Struct fields that are enums now get an extra typed Dart enum member, unless you configure enums as integers.
Must act Top 3 of 5 that need code or config changes
What you must change
Breaking5
Renames the
assetId option under ffi-native to asset-id to follow dash-case.assetIdasset-idObjC blocks are now passed through all ObjC APIs as
ObjCBlock<Ret Function(Args...)> instead of the codegenned ObjCBlock_... wrapper.ObjCBlockObjCBlock_...Generated ObjC code is migrated to ARC and must now be compiled with ARC enabled.
s.requires_arc-fobjc-arcStructs with enum members now also generate the member as a Dart enum value alongside the integer member.
enumMemberAsIntenumMemberMyEnumEnums generated as integers now generate
sealed classes instead of abstract classes.sealedabstract