0

Suddenly in project I got an error 'import js.dart' or smth like that. I found a command tip 'flutter channel beta' so I changed, upgraded, and after that nothing works.

When I run any command in flutter I get error:

Building flutter tool...
The current Dart SDK version is 2.10.0-0.0.dev.flutter-a3815b6590.

Because flutter_tools depends on collection >=1.15.0-nnbd <1.15.0-nullsafety.2 which
  requires SDK version >=2.9.0-18.0 <=2.9.10, version solving failed.
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds...

Thank you in advance

rioV8
  • 24,506
  • 3
  • 32
  • 49
nzxcvbnm
  • 154
  • 1
  • 10

1 Answers1

3

I just cd to flutter root folder then "git pull origin --ff-only", finally type "flutter upgrade".

Dharman
  • 30,962
  • 25
  • 85
  • 135
hoangphucptit
  • 31
  • 1
  • 2