aagarwal1012 / Animated-Text-Kit

🔔 A flutter package to create cool and beautiful text animations. [Flutter Favorite Package]
https://animated-text-kit.web.app
MIT License
1.66k stars 304 forks source link

Reconsider requiring textStyle property for AnimatedText subclasses #215

Closed awhitford closed 3 years ago

awhitford commented 3 years ago

The textStyle property is required for AnimatedText subclasses. It can lead to a bunch of repetition.

Does it make sense to leverage the DefaultTextStyle widget? Could that simplify the code?

Note that being able to provide a unique textStyle is still valuable. However, when you are specifying the same value for each AnimatedText instance, it becomes verbose and repetitive. The expectation is that when no explicit textStyle is specified, it would fallback to the default text style, and the DefaultTextStyle widget could be used to wrap the whole AnimatedTextKit if you want to apply a consistent style across animations.

Success would mean:

awhitford commented 3 years ago

Note that I had this idea from PR #216, resolving #211.