Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 8b80552

Browse files
authored
Fix language version check logic to determine nullsafe soundness. (#116679)
1 parent 3f1fb1b commit 8b80552

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/flutter_tools/lib/src/runner/flutter_command.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1089,7 +1089,8 @@ abstract class FlutterCommand extends Command<void> {
10891089
);
10901090
// Extra frontend options are only provided if explicitly
10911091
// requested.
1092-
if (languageVersion.major >= nullSafeVersion.major && languageVersion.minor >= nullSafeVersion.minor) {
1092+
if ((languageVersion.major > nullSafeVersion.major) ||
1093+
(languageVersion.major == nullSafeVersion.major && languageVersion.minor >= nullSafeVersion.minor)) {
10931094
nullSafetyMode = NullSafetyMode.sound;
10941095
} else {
10951096
nullSafetyMode = NullSafetyMode.unsound;

0 commit comments

Comments
 (0)