Skip to content

Commit ecb8b7e

Browse files
Generate real enums instead of enum-like classes (#1198)
Co-authored-by: Levi Lesches <[email protected]>
1 parent acf7d21 commit ecb8b7e

19 files changed

+2116
-1482
lines changed

pkgs/ffigen/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
- __Breaking change__: Code-gen the ObjC `id` type to `ObjCObjectBase` rather
44
than `NSObject`, since not all ObjC classes inherit from `NSObject`. Eg
55
`NSProxy`.
6+
- __Breaking change__: Enums are now generated as real Dart enums, instead of
7+
abstract classes. Since Dart enums cannot be empty, empty native enums are
8+
generated as empty sealed classes. Native enum members with duplicate integer
9+
values are handled properly, and are equal to each other in Dart as well.
610
- Rename ObjC interface methods that clash with type names. Fixes
711
https://github.com/dart-lang/native/issues/1007.
812

pkgs/ffigen/analysis_options.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ analyzer:
1515
- example/objective_c/**
1616
- example/swift/**
1717
- test_flutter/native_objc_test/**
18+
- test/native_objc_test/**
1819
language:
1920
strict-casts: true
2021
strict-inference: true

0 commit comments

Comments
 (0)