我试图使一个IntTween动画,但不是与'int'。我必须动画操作的结果如何出现在屏幕上(这个操作与字母一起发生)。因此,我想使用intween,但它不与字符串工作。
IntTween({int? begin, int? end})
在这种情况下,它应该是一个字符串而不是'int'。
有什么建议吗?
class _NextPageState extends State<NextPage> with SingleTickerProviderStateMixin {
late final AnimationController _animationController = AnimationController(
vsync: this,
duration: const Duration(milliseconds: 1500),
);
late final Animation<int> _animation;
@override
void initState() {
super.initState();
_animation = IntTween(begin: 0, end: widget.result).animate( // Here is where the error is
CurvedAnimation(parent: _animationController, curve: Curves.easeInOut));
_animationController.forward();
}
我想要这个代码做什么,但使用String而不是int