Skip to content

Commit

Permalink
Fix language version check logic to determine nullsafe soundness. (#1…
Browse files Browse the repository at this point in the history
…16679)
  • Loading branch information
a-siva authored Dec 7, 2022
1 parent 3f1fb1b commit 8b80552
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/flutter_tools/lib/src/runner/flutter_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,8 @@ abstract class FlutterCommand extends Command<void> {
);
// Extra frontend options are only provided if explicitly
// requested.
if (languageVersion.major >= nullSafeVersion.major && languageVersion.minor >= nullSafeVersion.minor) {
if ((languageVersion.major > nullSafeVersion.major) ||
(languageVersion.major == nullSafeVersion.major && languageVersion.minor >= nullSafeVersion.minor)) {
nullSafetyMode = NullSafetyMode.sound;
} else {
nullSafetyMode = NullSafetyMode.unsound;
Expand Down

0 comments on commit 8b80552

Please sign in to comment.