Unverified Commit 8b80552a authored by Siva's avatar Siva Committed by GitHub

Fix language version check logic to determine nullsafe soundness. (#116679)

parent 3f1fb1b9
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment