Open TcBello opened 3 years ago
Currently, not that I know of.
In the meantime, you can pass a key
and change it, which should cause the widget to rebuild from the initial state.
Currently, not that I know of. In the meantime, you can pass a
key
and change it, which should cause the widget to rebuild from the initial state.
I spend alot of time to reset animation to initial state. finally, your answer hint me to do it. Thanks, That is how I manage it. may be helpful for someone.
Key _refreshKey = UniqueKey();
void _handleLocalChanged() => setState((){
_refreshKey = UniqueKey()
});
Widget build(BuildContext context){
return MaterialApp(
key: _refreshKey ,
...
)
}
Is there any way to reset the animation of the text programatically?