I want to play a text animation only once in my flutter
app. For this purpose, I am using this package:
animated_text_kit: ^4.2.2
This is my code:
TableRow( children: [
Column(children:const [Text('Message',style:TextStyle(fontSize: 16))]),
Column(children:[AnimatedTextKit(
animatedTexts: [
TypewriterAnimatedText(
'Hey, sup!',
textStyle: const TextStyle(
fontSize: 16.0,
),
),
],
totalRepeatCount: 1,
)]),
]),
I expect the animation to be played only once. But when I execute the code, the animation doesn't play. It just stays on as a normal text.
How do I fix this issue?
CodePudding user response:
the text is animating but the speed is high therefore you are not able to see it, you can add speed manually,
Here's the code snippet you can try:
TypewriterAnimatedText(
'Hey, sup!',
textStyle: const TextStyle(
fontSize: 16.0,
color: Colors.black,
),
speed: Duration(milliseconds: 500),
)
Hope it helps