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.65k stars 305 forks source link

Bad Performance? Doesn't run @60fps? #250

Open ColbyIris opened 3 years ago

ColbyIris commented 3 years ago

I don't know if it's just me but i am using RotateAnimatedText and i notice that the animation isn't very smooth. looks pretty janky even on my ipad pro 12.9 inch.

Is there some known performance issue, or ways to improve current performance?

SirusCodes commented 3 years ago

Hey thanks for bringing this to notice. But can you verify that this is not because of iOS jank issue in flutter? Also, it would be great if you can point us which render is causing jank for devtools?

ColbyIris commented 3 years ago

Hi, thanks for the response - i notice this is also the case running on web release mode using canvasKit renderer.

SirusCodes commented 3 years ago

Can you point us which widget is taking most time to render? and only RotateAnimatedText is facing an jank?

ColbyIris commented 3 years ago

here is the widget:

` ///TODO this does not seem to run @60fps. Investigate alternative class SeeWhos extends StatelessWidget { @override Widget build(BuildContext context) { return Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ DefaultTextTitle( textTitle: 'Leading text ', fontSize: 10, color: context.theme.hintColor, ), DefaultTextStyle( softWrap: false, textWidthBasis: TextWidthBasis.longestLine, style: TextStyle( fontSize: 12, color: Color.primaryColor, ), child: Container( // color: Colors.red, child: AnimatedTextKit( repeatForever: true, animatedTexts: [ animatedText('text1'),animatedText('text1'),animatedText('text1'),animatedText('text1'),animatedText('text1'), ], onTap: () { print("Tap Event"); }, ), ), ), ], ), DefaultTextTitle( textTitle: 'sub text', fontSize: 10, color: context.theme.hintColor, ), ], ); }

animatedText(String text) { return RotateAnimatedText( text, transitionHeight: 20, ); } } `

SirusCodes commented 3 years ago

Cool we will try to have a look at it.