-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Deprecate describeEnum
+ type stricter EnumProperty
#9003
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have some rather large changes. Also, the previous "Deprecate describeEnum" PR has some of the same issues.
## Summary | ||
|
||
The class `EnumProperty` was modified to extend `<T extends Enum?>` instead of | ||
`<T>`. Existing uses of `EnumProperty<NotAnEnum>` should use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
`<T>`. Existing uses of `EnumProperty<NotAnEnum>` should use | |
`<T>`. Previous uses of `EnumProperty<NotAnEnum>` should use |
Dart 2.17 introduced enhanced enums. With them, Enum became a type. | ||
Before that, it was common to use classes as enums, and `EnumProperty` | ||
was used to represent them. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dart 2.17 introduced enhanced enums. With them, Enum became a type. | |
Before that, it was common to use classes as enums, and `EnumProperty` | |
was used to represent them. | |
Dart 2.17 introduced [enhanced enums][], which added `Enum` as a type. | |
Before that, enum classes were often defined as an `EnumProperty`. | |
[enhanced enums]: {{site.dart-site}}/language/enums#declaring-enhanced-enums |
@@ -0,0 +1,72 @@ | |||
--- | |||
title: Migration guide for EnumProperty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: Migration guide for EnumProperty | |
title: Update EnumProperty to be type strict |
EnumProperty
type stricterdescribeEnum
+ type stricter EnumProperty
I merged the older |
describeEnum
+ type stricter EnumProperty
describeEnum
+ type stricter EnumProperty
Friendly bump. |
cc @sfshaza2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry I missed your updates before. This looks much better, but there are a few little things, still.
|
||
[☂️ Cleanup SemanticsFlag and SemanticsAction issue]: {{site.repo.flutter}}/issues/123346 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you delete this line? It should be:
- [Cleanup SemanticsFlag and SemanticsAction issue][cleanup-issue]
And then [cleanup-issue] is defined below. It allows a shortcut to that loooong title.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand but I think I did this now. I put the long title reference in the related issues, and in the master link it links to the shorter title.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Is the failing check intended (will be auto fixed once the original thing is merged)? It seems to be 404 itself.. |
Fixing broken link
(do I still need the review from @parlough ? It's been a while I don't break anything, I forgot how the process is). |
Sequel to #8571 and flutter/flutter#125016. This is super small, but broke a test that copied a Flutter file (and was not modified when Flutter got updated).