Fix language version check logic to determine nullsafe soundness. (#116679)
This commit is contained in:
parent
3f1fb1b960
commit
8b80552a3c
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user