Dart SDK version error when getting dependencies
The reason was flutter console being in the beta channel, causing flutter to not upgrade to latest version. Fix was flutter channel dev
then flutter upgrade
in console.
Yi Li
Updated on December 06, 2022Comments
-
Yi Li over 1 year
I'm trying to add the
http
and image Dart packages. After adding the dependencies inpubspec.yaml
and attempt to "Get dependencies", I'm getting the version error.I have attempted "Check for Update" in
IntelliJ
, reinstall Flutter and Dart plug in inIntelliJ
, redownloadFlutter
, and ran "flutter upgrade" in Flutter Console, with no luck. It seems theDart SDK
that comes withFlutter
has not been updated.I was able to download later version of
Dart SDK
independently, but if I just drop thedart-sdk
folder of a newer version into the Flutter folder, I get more error still.How can I update the
Dart SDK
in theFlutter package
, so I can add dependencies?