Founding Engineer @ Shorebird
One of the big features of Flutter 3.24.0 is an upgrade to Dart 3.5.0, which comes with a whole bunch of nice changes. Unfortunately, like all software releases, it also came with some bugs.
We encountered some bugs when upgrading our projects at Shorebird and have listed the problems and workarounds we found here:
We were not alone in seeing this issue. Fortunately, the fix is fairly straightforward:
flutter pub cache clean
flutter pub upgrade
If you track your pubspec.lock
file in source control (tip: you should!), you
should see that the win32
dependency has been upgraded, and you should now be
able to build.
If:
pubspec.yaml
file is not at the root of your repo (or “workspace”)analysis_options.yaml
file uses an “import” to pull in rules from
another file (the default Flutter and Dart templates include package:lints
or package:flutter_lints
).This can be worked around by adding a pubspec.yaml
at the root of your
checkout/workspace. This is what we’ve used:
# This file is a workaround for https://github.com/dart-lang/sdk/issues/56047
name: your_project_name_here
environment:
sdk: ^3.5.0
dev_dependencies:
very_good_analysis: ^6.0.0
The above example uses very_good_analysis (which is the lints package we use at Shorebird), but you can easily change the above to use package:lints or package:flutter_lints or whatever analysis imports you depend on.
You can test that this is working by introducing an error in one of your packages not at the root of your repo and you should once again see that error in the “Problems” tab of Visual Studio Code.
Did you have trouble with Dart 3.5.0? Did we miss something? We’d love to hear from you. Reach out via email or Discord anytime.
If you'd like to read more articles like this, please subscribe to our newsletter.