I’m using FVM to switch from SDK 2.10.5 to 3.24.2, but I get this error:
Future isn't a type. Try correcting the name to match an existing type.
Initially, I tried importing dependencies and updating the SDK environment in pubspec.yaml
in VSCode, but nothing worked. Then, I opened the same project in Android Studio Koala (the newer version), and it ran successfully without any code changes.
command I used in Android Studio(already select sdk using fvm):
fvm flutter pub get
and
fvm flutter run
So, I can assume this issue might be caused by the IDE or Flutter/Dart settings in the IDE(both IDEs have the same SDK path and the same versions of Flutter and Dart installed).