Skip to content
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

Removed separate multicity_input Animations. #1

Merged
merged 2 commits into from
Aug 9, 2018

Conversation

deven98
Copy link
Contributor

@deven98 deven98 commented Aug 2, 2018

Removed separate multicity_input Animations.

@MarcinusX
Copy link
Owner

Hey man! Thanks for PR! It looks much better!
I just have one question: Do you know if it's ok to create those animations inside the build method instead of having them stored in State object?

@deven98
Copy link
Contributor Author

deven98 commented Aug 3, 2018

I think it's okay considering we're not rerunning the animation or even rebuilding the layout using setState(). My first instinct when I read your question was, if we run setState() at any point during or after the animation, it might restart. But when I did it myself using Future.delayed(), it didn't rerun either time. So I think it's fine compared to a state object.

arrivalAnimation = new CurvedAnimation(
parent: textInputAnimationController,
curve: Interval(0.75, 0.95, curve: Curves.linear));
textInputAnimationController.forward();
Copy link
Owner

Choose a reason for hiding this comment

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

It's not supposed to run on init. Only on plus click. Could you remove this line and then I will merge, ok? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess I just forgot to remove that line after testing, I'll do it as soon as I can!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've removed line 20 starting the animation. Sorry for the delay.

@MarcinusX MarcinusX merged commit 022404c into MarcinusX:master Aug 9, 2018
@MarcinusX
Copy link
Owner

Thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants