Skip to content

Conversation

@mateusfccp
Copy link
Contributor

@mateusfccp mateusfccp commented Feb 14, 2022

The method _startHeroTransition, from HeroController, receives an Animation<double> animation, but does nothing with it. This PR removes the parameter.

Consequently, it removes the animation variable from _maybeStartHeroTransition, as it was being created only to be passed to _startHeroTransition. The conditional that would create this variable depending on the hero type could then be merged into the switch below.

Fixes #98548

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I signed the [CLA].
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is [test-exempt].
  • All existing and new tests are passing.

@flutter-dashboard flutter-dashboard bot added the framework flutter/packages/flutter repository. See also f: labels. label Feb 14, 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.

@mateusfccp
Copy link
Contributor Author

Regarding linking this PR to an issue, what kind of issue should I open? I didn't find anything that matches this kind of PR.

image

@Hixie
Copy link
Contributor

Hixie commented Feb 16, 2022

test-exempt: code refactor with no semantic change

@mateusfccp re the issue, you can just open a blank one (or follow any of the links above and ignore the template). It's just useful to have an issue in case the PR gets reverted (e.g. due to unrelated infra issues) so we don't forget to reland it.

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

LGTM

Thanks for the cleanup!

@goderbauer goderbauer merged commit 7055bec into flutter:master Feb 16, 2022
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.

Secondary LGTM 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove unused parameter in hero code

4 participants