AnimationController The named parameter 'vsync' isn't defined

in your pubspec.yml

change this to :

environment:
  sdk: ">=2.8.0 <3.0.0"

and flutter pub get

in android studio then invalidate the cache and restart, you should be good to go !

Credit : https://github.com/flutter/flutter/issues/62752#issuecomment-667744745


What happened is that @required syntax was migrated during the rollout of null-safety to now just be required. This is valid new-Dart, but if you upgrade with your editor open, it will have stale build rules. Simply run flutter clean and restart your IDE, and that should do it.

Hopefully no need to restart your computer, change internet providers, etc.


A few things (unfortunately not pinpointed) that help me with issues like this:

  • run flutter upgrade
  • run flutter pub get
  • run flutter clean
  • restart IDE
  • change flutter channel
  • and in this case, change minimum SDK version from 2.7.0 to 2.8.0.

There are, of course, caveats to a few of these tactics. More experienced developers would surely have more details to offer, but I haven't encountered issues with this approach.