Bump lower Dart SDK constraints to 3.0 & add class modifiers#122546
Bump lower Dart SDK constraints to 3.0 & add class modifiers#122546auto-submit[bot] merged 4 commits intoflutter:masterfrom
Conversation
|
FYI @jakemac53 @chingjun |
|
@LongCatIsLooong Do the changes to @gspencergoog Do the changes in |
LongCatIsLooong
left a comment
There was a problem hiding this comment.
YES! The overlay.dart changes LGTM. Pattern matching and record are still behind the experimental flag right?
Once this PR lands we're good to use them in the framework. This PR is still blocked on waiting for Dart v3.0.0-325.0.dev to roll into the engine & framework, though. That Dart version flips the flag on these features. |
4c20003 to
a559c82
Compare
|
cc @johnniwinther it sounds like we should hold off on landing this until exhaustiveness checking is finished? What is the status and is there an issue we can track? |
|
I am already getting a bunch of |
|
@goderbauer Note that the errors you see currently are from a temporary exhaustiveness algorithm based on flow-analysis. The real algorithm, which is in the process of being enabled, will yield different results. |
|
The CL for enabling the full exhaustiveness checking is https://dart-review.googlesource.com/c/sdk/+/288703 |
|
|
|
Full exhaustiveness checking is rolling into the framework with #123059. |
|
To my surprise, with the bump to 3.0 the analyzer complained about a handful of additional places where Edit: Looks like at runtime these new const get flagged as invalid: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8786064751393689137/+/u/run_test.dart_for_web_canvaskit_tests_shard_and_subshard_3/test_stdout |
There was a problem hiding this comment.
ScrollBehavior changed re: dart-lang/sdk#51802 LGTM. Thank you!
| child: ExpansionTile( | ||
| // TODO(goderbauer): Reevaluate the following ignores when https://github.com/dart-lang/sdk/issues/51800 is fixed. | ||
| await tester.pumpWidget(MaterialApp( // ignore: prefer_const_constructors | ||
| home: Material( // ignore: prefer_const_constructors |
There was a problem hiding this comment.
Are these going to show up in any customer code that uses prefer_const_constructors? This lint is turned on as part of flutter_lints, so it might affect a lot of people if so.
There was a problem hiding this comment.
Yeah, they will see this once they bump the sdk constraints to 3.0 in their pubspecs. I am pushing hard on dart-lang/sdk#51800 to get this fixed before Dart 3 is released to stable.
There was a problem hiding this comment.
Yeah, that seems important.

Part of #118837.
This will allow us to use the latest Dart 3.0 features.
This PR also adds class modifiers where necessary:
baseclass) to make the analyzer warnings below happyTapRegionRegistryis used to fix analyzer warningsBlocked on waiting for flutter/engine#40178 to roll into the framework.