-
Notifications
You must be signed in to change notification settings - Fork 28.7k
Use super.key instead of manually passing the Key parameter to the parent class #147621
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
Conversation
…er(key: key) in the constructors
Thanks for the clean-up. Looks like the analyzer is not happy, though: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8749165137680142961/+/u/run_test.dart_for_analyze_shard_and_subshard_None/stdout Could you look into that and fix whatever it is complaining about? |
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.
Thanks a bunch for the contribution!
Sorry to make a bunch of suggestions at once, but hopefully we can get all those tests to start passing soon 😄
Thank you, too, for all your amazing work in this framework, I wasn't planning on contributing to Flutter, but I found one of the widget in flutter source code that still passing it to the super class by manually creating the Key, so I searched using the IDE and found all of this. I will do what you suggested as soon as I can |
Co-authored-by: Nate <[email protected]>
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 to hear about your slow network connection! Let's see if we can get these tests passing…
packages/flutter/test/widgets/binding_deferred_first_frame_test.dart
Outdated
Show resolved
Hide resolved
packages/flutter/test/widgets/disposable_build_context_test.dart
Outdated
Show resolved
Hide resolved
packages/flutter/test/widgets/scroll_aware_image_provider_test.dart
Outdated
Show resolved
Hide resolved
For some context: There is a |
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.
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
Thank you very much!
Thank you for the info. I didn't know about it |
…o the parent class (flutter/flutter#147621)
…o the parent class (flutter/flutter#147621)
…o the parent class (flutter/flutter#147621)
flutter/flutter@1255435...d2da1b2 2024-05-14 [email protected] Roll Flutter Engine from 491f460a25fb to 7bf865774d06 (1 revision) (flutter/flutter#148325) 2024-05-14 [email protected] Roll Packages from 1412041 to fd714bd (1 revision) (flutter/flutter#148324) 2024-05-14 [email protected] Roll Flutter Engine from c381b852605f to 491f460a25fb (1 revision) (flutter/flutter#148319) 2024-05-14 [email protected] Roll Flutter Engine from b4b798d2e706 to c381b852605f (1 revision) (flutter/flutter#148303) 2024-05-14 [email protected] Roll Flutter Engine from 0de6701b537a to b4b798d2e706 (2 revisions) (flutter/flutter#148299) 2024-05-14 [email protected] Roll Flutter Engine from 764c33c3c773 to 0de6701b537a (2 revisions) (flutter/flutter#148297) 2024-05-14 [email protected] Roll Flutter Engine from 797eab742925 to 764c33c3c773 (1 revision) (flutter/flutter#148290) 2024-05-14 [email protected] Roll Flutter Engine from 84687fe0f199 to 797eab742925 (1 revision) (flutter/flutter#148288) 2024-05-14 [email protected] Roll Flutter Engine from bee398d95abe to 84687fe0f199 (3 revisions) (flutter/flutter#148282) 2024-05-14 [email protected] Roll Flutter Engine from a1cdcb6a6687 to bee398d95abe (2 revisions) (flutter/flutter#148280) 2024-05-14 [email protected] Roll Flutter Engine from 13a561cb6d5a to a1cdcb6a6687 (1 revision) (flutter/flutter#148276) 2024-05-14 [email protected] Roll Flutter Engine from 7dcbd93e5c1a to 13a561cb6d5a (6 revisions) (flutter/flutter#148274) 2024-05-13 [email protected] Roll Flutter Engine from aeff9b174c84 to 7dcbd93e5c1a (1 revision) (flutter/flutter#148266) 2024-05-13 [email protected] Mark platform_views_scroll_perf_ad_banners__timeline_summary not flaky (flutter/flutter#148263) 2024-05-13 [email protected] add more print traces in hot runner workflow (flutter/flutter#148258) 2024-05-13 [email protected] Refactors page API (flutter/flutter#137792) 2024-05-13 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.3 to 3.25.5 (flutter/flutter#148262) 2024-05-13 [email protected] Roll Flutter Engine from 11502404a52a to aeff9b174c84 (2 revisions) (flutter/flutter#148260) 2024-05-13 [email protected] Use super.key instead of manually passing the Key parameter to the parent class (flutter/flutter#147621) 2024-05-13 [email protected] Try fix module test (flutter/flutter#147934) 2024-05-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reland Native ios context menu (#143002) (#148238)" (flutter/flutter#148254) 2024-05-13 [email protected] Reland Native ios context menu (#143002) (flutter/flutter#148238) 2024-05-13 [email protected] Roll Flutter Engine from 636374fd00ee to 11502404a52a (1 revision) (flutter/flutter#148242) 2024-05-13 [email protected] Roll Packages from 6c4482a to 1412041 (16 revisions) (flutter/flutter#148239) 2024-05-13 [email protected] Roll Flutter Engine from 0050bf9a8094 to 636374fd00ee (1 revision) (flutter/flutter#148216) 2024-05-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Native ios context menu (#143002)" (flutter/flutter#148237) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
flutter/flutter@1255435...d2da1b2 2024-05-14 [email protected] Roll Flutter Engine from 491f460a25fb to 7bf865774d06 (1 revision) (flutter/flutter#148325) 2024-05-14 [email protected] Roll Packages from 1412041 to fd714bd (1 revision) (flutter/flutter#148324) 2024-05-14 [email protected] Roll Flutter Engine from c381b852605f to 491f460a25fb (1 revision) (flutter/flutter#148319) 2024-05-14 [email protected] Roll Flutter Engine from b4b798d2e706 to c381b852605f (1 revision) (flutter/flutter#148303) 2024-05-14 [email protected] Roll Flutter Engine from 0de6701b537a to b4b798d2e706 (2 revisions) (flutter/flutter#148299) 2024-05-14 [email protected] Roll Flutter Engine from 764c33c3c773 to 0de6701b537a (2 revisions) (flutter/flutter#148297) 2024-05-14 [email protected] Roll Flutter Engine from 797eab742925 to 764c33c3c773 (1 revision) (flutter/flutter#148290) 2024-05-14 [email protected] Roll Flutter Engine from 84687fe0f199 to 797eab742925 (1 revision) (flutter/flutter#148288) 2024-05-14 [email protected] Roll Flutter Engine from bee398d95abe to 84687fe0f199 (3 revisions) (flutter/flutter#148282) 2024-05-14 [email protected] Roll Flutter Engine from a1cdcb6a6687 to bee398d95abe (2 revisions) (flutter/flutter#148280) 2024-05-14 [email protected] Roll Flutter Engine from 13a561cb6d5a to a1cdcb6a6687 (1 revision) (flutter/flutter#148276) 2024-05-14 [email protected] Roll Flutter Engine from 7dcbd93e5c1a to 13a561cb6d5a (6 revisions) (flutter/flutter#148274) 2024-05-13 [email protected] Roll Flutter Engine from aeff9b174c84 to 7dcbd93e5c1a (1 revision) (flutter/flutter#148266) 2024-05-13 [email protected] Mark platform_views_scroll_perf_ad_banners__timeline_summary not flaky (flutter/flutter#148263) 2024-05-13 [email protected] add more print traces in hot runner workflow (flutter/flutter#148258) 2024-05-13 [email protected] Refactors page API (flutter/flutter#137792) 2024-05-13 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 3.25.3 to 3.25.5 (flutter/flutter#148262) 2024-05-13 [email protected] Roll Flutter Engine from 11502404a52a to aeff9b174c84 (2 revisions) (flutter/flutter#148260) 2024-05-13 [email protected] Use super.key instead of manually passing the Key parameter to the parent class (flutter/flutter#147621) 2024-05-13 [email protected] Try fix module test (flutter/flutter#147934) 2024-05-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Reland Native ios context menu (#143002) (#148238)" (flutter/flutter#148254) 2024-05-13 [email protected] Reland Native ios context menu (#143002) (flutter/flutter#148238) 2024-05-13 [email protected] Roll Flutter Engine from 636374fd00ee to 11502404a52a (1 revision) (flutter/flutter#148242) 2024-05-13 [email protected] Roll Packages from 6c4482a to 1412041 (16 revisions) (flutter/flutter#148239) 2024-05-13 [email protected] Roll Flutter Engine from 0050bf9a8094 to 636374fd00ee (1 revision) (flutter/flutter#148216) 2024-05-13 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Native ios context menu (#143002)" (flutter/flutter#148237) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
…o the parent class (flutter/flutter#147621)
Use
super.key
instead of manually passing theKey
parameter using super(key: key) in the constructors.Since if you create a widget the new default will use
super.key
instead ofKey? key : super(key: key)
this small change is to maintain the consistency, it has no semantic changealso there are some other places that might need to be updated:
this file for example generate l10n project and it has all the dart code as String, it might have tests that validate the output somewhere that I might miss, also there are some other places like the
_Segment
class where it requireValueKey
instead ifKey
so I didn't update them (even though it's possible)Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.