Flutter: After flutter 1.22 update, I am getting error in Lineargradient properties

11,341

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.

Share:
11,341
Arsalan Umer
Author by

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

Comments

  • Arsalan Umer
    Arsalan Umer over 1 year

    After the flutter 1.22 update, I am getting an error in Lineargradient colors property it's giving me an error that the name colors parameter isn't defined..I am getting this error everywhere in the project after the update of flutter and flutter plugin in android studio.enter image description here