Flutter 开发遇到的问题
2020-10-23 本文已影响0人
HenryCheng
1. AnimationController has lost it's vsync
在升级 Flutter 1.22.1 以后发现 AnimationController 的 required 参数 vsync 传进去以后报错,其实根本不提示这个参数,查了下资料在 Flutter 的项目 AnimationController has lost it's vsync 中有人提到,目前解决办法如下
- change minimum sdk to 2.8
- run flutter upgrade
- run flutter pub get
- run flutter clean
- restart IDE
跟踪 Flutter 的稳定版本
flutter channel stable
然后升级就好
flutter upgrade