Dart version is 2.2.0 but I get an error requiring version >=2.2.0
The output of dart --version
is completely irrelevant for Flutter. What you need to check is flutter doctor -v
or flutter --version
. In your case it shows Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
You probably need to switch to another channel until the next stable channel update
flutter channel dev
or
flutter channel master
Flutter has its own dart-sdk in flutter/bin/cache/
. So when you do dart --version
, its probably another dart sdk in your system.