I am trying to create two sequential animations using Flutter. Both are using Curves.easeIn, and the second one starts on top of the first one, instead of from 0. Image a car starts to move from 0 to 50 miles/hours, after it runs a few while, it speeds to 70 miles/hour from 50 miles/hour instead of 0 miles/hour. How can I do it?
I am aware of and using TweenSequence, but I can’t figure out a way to make it work.
Thanks.
2
Answers
It may be helpful to see what exactly it is that you’ve tried to ensure that we’re not just flying blind here and missing your point, but I can point you to the documentation here and provide:
Happy to take a deeper look if you can add the code that’s giving you trouble, and I can modify my answer to be more bespoke if needed. Goodluck.
You could try something like this:
Note it’s sort of a pain because Flutter doesn’t natively support what I think you’re trying to achieve of sharing a curve’s momentum across animation intervals.
Without knowing your exact use case I can’t provide a great example that demonstrates the curve nicely; using the curve as I am here to move the same widget just in a different direction is a little silly, but I’m hoping maybe this is close enough to be useful to you?