I'm using fvm to use a later version of flutter (3.15.0-15.2.pre) than my global version (3.10.6). I've ran fvm use 3.15.0-15.2.pre and my project is using that.
I have updated my pubspec.yaml with this:
environment:
sdk: '>=3.1.0 <4.0.0'
flutter 3.15.0-15.2.pre should definitely be using dart > 3.1.
But I'm getting:
Error (Xcode): .dart_tool/flutter_build/dart_plugin_registrant.dart:1:1: Error: The specified language version is too high. The highest supported language version is 3.0
I'm doing everything to make sure it is using fvm dart.
I've run fvm flutter clean, fvm flutter pub get and .fvm/flutter_sdk/bin/flutter run --flavor development --dart-define-from-file "lib/config/environment_strings_dev.json" --target "lib/main_development.dart".
Yet I still get the error.
Is this error not to do with the dart version being too low, but 3.15.0-15.2.pre uses a high enough dart version?
I've seen Error: The specified language version is too high. The highest supported language version is 2.8. in android studio how can I fix it? But deleting the .dart_tool directory doesn't work.
flutter doctor shows my global flutter version not my project version so fvm isn't working.
It runs on the android emulator but not the ios simulator.
In my case, I was able to fix this issue by setting the path to the flutter version I was using on Xcode and you can do this by doing the following
Hopefully, This should resolve the issue.