0

Yesterday I updated flutter from the command line. Then dart as well (I was prompted). After that all of my classes that have String in them appear to have errors (String isn't a type -of course I do import dart-core but nothing happens).

enter image description here

Flutter doctor gives this error

enter image description here

event though they seem to be installed

enter image description here

I 've seen the following but nothing helps

https://github.com/flutter/flutter/issues/28995

Flutter plugin not installed error;. When running flutter doctor

Android Studio flutter and dart plugins not recognized by flutter doctor , but plugins are installed

I 'm on stable channel, Android Studio 4.1. I have tried everything found in here (flutter pub get, upgrade, clean etc, Android Studio's invalidate cache, but still the same. I can work from the command line, but that is not a solution.

Any ideas? Thank you very much!

oupoup
  • 75
  • 8
  • 1
    You probably need to update the Dart SDK Path in Android Studio. I am in IntelliJ with the Dart plugin, and for me the path is set at `Preferences > Languages & Frameworks > Dart`. On Mac, it should be at `/usr/local/opt/dart/libexec`. – Renato Nov 07 '20 at 10:09
  • You do not need to set Dart SDK path when you are developing Flutter apps. Setting Dart SDK path is for developing Dart-only applications (command line, etc.). I would avoid doing that to prevent making the problem more complicated. – Gazihan Alankus Nov 07 '20 at 12:38

1 Answers1

1

Try this,

go to setting and check your dart sdk path. enter image description here

after set or check your path. if its wrong. set right path and then Enable dart support module for your project. after this click on apply.

Shirsh Shukla
  • 5,491
  • 3
  • 31
  • 44
  • It was the flutter sdk path that was empty, but you pointed me to the right direction. Thank you very much Shirsh! – oupoup Nov 07 '20 at 19:06