Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate real enums instead of enum-like classes #1198

Merged
merged 7 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkgs/ffigen/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
- __Breaking change__: Code-gen the ObjC `id` type to `ObjCObjectBase` rather
than `NSObject`, since not all ObjC classes inherit from `NSObject`. Eg
`NSProxy`.
- __Breaking change__: Enums are now generated as real Dart enums, instead of
abstract classes. Since Dart enums cannot be empty, empty native enums are
generated as empty sealed classes. Native enum members with duplicate integer
values are handled properly, and are equal to each other in Dart as well.
- Rename ObjC interface methods that clash with type names. Fixes
https://github.com/dart-lang/native/issues/1007.

Expand Down
1 change: 1 addition & 0 deletions pkgs/ffigen/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ analyzer:
- example/objective_c/**
- example/swift/**
- test_flutter/native_objc_test/**
- test/native_objc_test/**
language:
strict-casts: true
strict-inference: true
Expand Down
Loading