animatedBuilder method
Widget showing animated text, based on animation value(s).
Implementation
@override
Widget animatedBuilder(BuildContext context, Widget? child) {
final defaultTextStyle = DefaultTextStyle.of(context).style;
final scaleFactor = MediaQuery.of(context).textScaleFactor;
return RepaintBoundary(
child: CustomPaint(
painter: _WTextPainter(
progress: _waveAnim.value,
text: text,
textStyle: defaultTextStyle.merge(textStyle),
scaleFactor: scaleFactor,
),
child: Text(
text,
style: defaultTextStyle
.merge(textStyle)
.merge(TextStyle(color: Colors.transparent)),
textScaleFactor: scaleFactor,
),
),
);
}