Flutter: After flutter 1.22 update, I am getting error in Lineargradient properties
Solution 1
run flutter clean
command and restart IDE worked for me
Solution 2
Restarting your Android Studio should fix this issue.
This is because in Dart 2.10, required
becomes a keyword (previously was @required
). The IDE probably doesn't recognize that you've updated the Dart SDK.
Solution 3
Run flutter clean and then restart your IDE. I use Visual Studio Code and it worked for me...
Solution 4
I quit my Visual Studio code and restarted it.
It worked for me.
Solution 5
AnimationController(vsync is not defined) when I upgraded to flutter version 1.22.3.
Flutter clean also worked for me. From any project run flutter clean and restart VS code. Everything will work fine as before.
Arsalan Umer
I'm an ordinary village boy and also a Lazy Programmer. Flutter programming has been my passion since I compiled my first hello-world program. Solving real problems for Flutter developers is always been an interesting part for me.
Updated on December 24, 2022