Skip to content

Conversation

@goderbauer
Copy link
Member

@goderbauer goderbauer commented Mar 22, 2022

#100575

Once all code in the repo has been migrated, we can turn on the use_super_parameters lint.

@flutter-dashboard flutter-dashboard bot added a: animation Animation APIs a: text input Entering text in a text field or keyboard related problems f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Mar 22, 2022
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@skia-gold
Copy link

Gold has detected about 1 new digest(s) on patchset 1.
View them at https://flutter-gold.skia.org/cl/github/100515

@Hixie
Copy link
Contributor

Hixie commented Mar 28, 2022

test-exempt: code refactor with no semantic change

@Piinks Piinks self-requested a review March 28, 2022 21:02
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with musings. :)

assert(sectionIndex >= 0 && sectionIndex < sections.length),
assert(selectedIndex.value! >= 0.0 && selectedIndex.value! < sections.length.toDouble()),
super(key: key, listenable: selectedIndex);
super(listenable: selectedIndex);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this is interesting, if the names do not match you can't use the super shorthand... but listenable would not make sense as a parameter here.

class _TappableWhileStatusIs extends StatefulWidget {
const _TappableWhileStatusIs(
this.status, {
Key? key,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see some of these end up with no key instead of super.key. Why is that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are private widgets and the key parameter is unused. The unused_element lint would trigger here if super.key were to be used.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So clean! Lints are the future. 🤖

@goderbauer goderbauer merged commit 89b437e into flutter:master Mar 28, 2022
@goderbauer goderbauer deleted the super_params5 branch March 28, 2022 23:04
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: animation Animation APIs a: text input Entering text in a text field or keyboard related problems c: contributor-productivity Team-specific productivity, code health, technical debt. f: cupertino flutter/packages/flutter/cupertino repository f: material design flutter/packages/flutter/material repository. f: scrolling Viewports, list views, slivers, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants