animatedBuilder method
Widget showing animated text, based on animation value(s).
Implementation
@override
Widget animatedBuilder(context, child) {
// get the count / text text length base from the animation value
final count = (_scrambleText.value * textCharacters.length).round();
return RichText(
text: TextSpan(
children: List.generate(
count,
(index) {
return WidgetSpan(
child: ScrambledChar(
char: textCharacters.elementAt(index),
scrambleDuration: speed,
style: textStyle,
),
);
},
),
),
);
}