Skip to content

Conversation

@yjbanov
Copy link
Contributor

@yjbanov yjbanov commented Jul 18, 2017

Copy link
Contributor

Choose a reason for hiding this comment

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

We usually use the style:

if (inverted)
  animation = new Tween<double>(begin: 1.0, end: 0.0).animate(animation);

Copy link
Contributor

Choose a reason for hiding this comment

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

(rather than ?:)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe mention in the comment that the reason we want to do this is to update the logic that depends on _isTransitioning in the build method.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

remove "right" in the comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

don't use strings if you can help it (since keys are compared). A ValueKey<CrossFadeState> would probably do the job more efficiently. (At least, I hope that comparing an enum is faster than comparing a string...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

you want to exclude the one that's going away and include the one that's coming in, regardless of the state of the animation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, good catch! Done.

@Hixie
Copy link
Contributor

Hixie commented Jul 19, 2017

LGTM

@yjbanov yjbanov force-pushed the animations-in-cross-fade branch from cc4b98e to 0682a23 Compare July 19, 2017 22:25
@yjbanov yjbanov merged commit 02b65bc into flutter:master Jul 19, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants