Skip to content

Fix issue with account drawer header arrow rotating when setState is called#29980

Merged
rami-a merged 5 commits intoflutter:masterfrom
rami-a:fix-25801-drawer-header-arrow
Mar 27, 2019
Merged

Fix issue with account drawer header arrow rotating when setState is called#29980
rami-a merged 5 commits intoflutter:masterfrom
rami-a:fix-25801-drawer-header-arrow

Conversation

@rami-a
Copy link
Contributor

@rami-a rami-a commented Mar 26, 2019

Description

The UserAccountsDrawerHeader had a bug with the arrow rotating whenever setState was called on its parent. This change makes sure that we check that the state actually changed before allowing the animation to trigger.

Related Issues

Fixes #25801

Checklist

Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • My PR includes tests for all changed/updated/fixed behaviors (See Test Coverage).
  • All existing and new tests are passing.
  • I updated/added relevant documentation (doc comments with ///).
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

Does your PR require Flutter developers to manually update their apps to accommodate your change?

@rami-a rami-a marked this pull request as ready for review March 26, 2019 15:12
@rami-a rami-a requested review from johnsonmh and willlarche March 26, 2019 15:13
@Piinks Piinks added the f: material design flutter/packages/flutter/material repository. label Mar 26, 2019
Copy link
Contributor

@johnsonmh johnsonmh left a comment

Choose a reason for hiding this comment

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

Nice fix!

Copy link
Contributor

@johnsonmh johnsonmh left a comment

Choose a reason for hiding this comment

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

LGTM

@rami-a rami-a requested a review from HansMuller March 27, 2019 14:32
Copy link
Contributor

@HansMuller HansMuller left a comment

Choose a reason for hiding this comment

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

LGTM

if (_animation.status == AnimationStatus.dismissed ||
_animation.status == AnimationStatus.reverse) {
// If the state of the arrow did not change, there is no need to trigger the animation
if (oldWidget.isOpen == widget.isOpen) {
Copy link
Contributor

Choose a reason for hiding this comment

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

NICE

@rami-a rami-a merged commit 64a28e3 into flutter:master Mar 27, 2019
@rami-a rami-a deleted the fix-25801-drawer-header-arrow branch March 27, 2019 15:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

f: material design flutter/packages/flutter/material repository.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

UserAccountsDrawerHeader initial direction of details arrow is inconsistent

5 participants