Open awhitford opened 3 years ago
@awhitford thanks for opening this issue , please assign it to me .
@awhitford I have a doubt like in the sample Effect 15 we have two separate Text elements, but in the animated-text kit package most of the animations work with single string at a time and I have been able to recreate Effect 15 for only one String at a time so I just want to confirm if that's we are planning to do .
Focus on the effect for 1 text element. What you are really animating is the zoom in effect.
You can consider that Effect 15 is actually TWO animated texts positioned side by side with a delay.
@saurabhraj042 You can implement it with CustomPainter
https://github.com/aagarwal1012/Animated-Text-Kit/blob/master/lib/src/wavy.dart is implemented using CustomPainter
It requires a lot of mathematical calculations but very customizable
Uhm... Is a CustomPainter approach really necessary? Isn't this just a reverse Scale Animation? You can likely take the Scale Animation and make some adjustments.
What I'm thinking is that user will pass a List<String>
like ["Buy Now", "On Sale"]
The sequence of animation would be like.
Buy
scales inNow
scales inBuy Now
fades outOn
scales inThis would be better with CustomPainter
Oh I realized with CustomPainter
user would be able to manage duration of text showing up🤔
@SirusCodes It would be wise to contain complexity. I also want to avoid baking too much complexity in a specific animation because a compositional approach that could be used for other animations is preferred.
The AnimatedText
class is designed to animate one text string.
If you want to string multiple texts, you then specify a List<AnimatedText>
elements to AnimatedTextKit
.
@SirusCodes I would be wise to contain complexity. I also want to avoid baking too much complexity in a specific animation because a compositional approach that could be used for other animations is preferred.
Yaa I also feel that CustomPainter
will over complicate the animation.
The
AnimatedText
class is designed to animate one text string. If you want to string multiple texts, you then specify aList<AnimatedText>
elements toAnimatedTextKit
.
What are you trying to say? AnimatedTextKit
is already taking List<AnimatedText>
as parameter🤔
@awhitford https://codeshare.io/GqgYqX please review this code snippet, I tried keeping it simple and the animation was close to Effect 15
@saurabhraj042 can you open a PR with gif of that animation?
What are you trying to say?
AnimatedTextKit
is already takingList<AnimatedText>
as parameter🤔
AnimatedTextKit
is a small example of a compositional approach because one can mix and match different AnimatedText
subclasses.
To be even more clear...
AnimatedText
subclass is to animate one text value.I hope this helps clarify my earlier comments.
Yes thanks now it's a lot clear 😃
@awhitford https://codeshare.io/GqgYqX please review this code snippet, I tried keeping it simple and the animation was close to Effect 15
I think this is meeting my expectations. I'd have to see it in action to be sure, but it looks pretty good.
I wonder if we can come up with a better name for the effect than OutNow
. It seems more like a "Zoom In" effect to me, but I'm definitely open to ideas here.
Also, I'm advocating that we do not make a corresponding Kit
class for each new animation. (We have them for the old animations for backwards compatibility.)
@awhitford I will do the changes and make a PR asap !
In addition to the new animation class...
example
app needs to be updated to include the new animation.I wonder if we can come up with a better name for the effect than
OutNow
. It seems more like a "Zoom In" effect to me, but I'm definitely open to ideas here.
How about ZoomInFadeOut
?
Also, I'm advocating that we do not make a corresponding
Kit
class for each new animation. (We have them for the old animations for backwards compatibility.)
Let's wait for the final words from admin.
@awhitford What do you mean by test coverage ?
Also, I'm advocating that we do not make a corresponding Kit class for each new animation. (We have them for the old animations for backward compatibility.)
I agree with @awhitford, we don't need any kit class from now on.
ZoomInFadeOut
looks fine to me @SirusCodes . 😅
@saurabhraj042 requested to add a new animated text like Effect 15