Update null safety warnings in prep for Dart 3 (#110998)

This commit is contained in:
Michael Thomsen 2022-09-07 14:59:25 +02:00 committed by GitHub
parent 65d891ddde
commit 242bb67d19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 8 deletions

View File

@ -722,6 +722,7 @@ class WindowsStdoutLogger extends StdoutLogger {
.replaceAll('', '') .replaceAll('', '')
.replaceAll('🔨', '') .replaceAll('🔨', '')
.replaceAll('💪', '') .replaceAll('💪', '')
.replaceAll('⚠️', '!')
.replaceAll('✏️', ''); .replaceAll('✏️', '');
_stdio.stdoutWrite(windowsMessage); _stdio.stdoutWrite(windowsMessage);
} }

View File

@ -88,11 +88,11 @@ abstract class BuildSubCommand extends FlutterCommand {
); );
} else { } else {
globals.printStatus( globals.printStatus(
'Building without sound null safety', 'Building without sound null safety ⚠️',
emphasis: true, emphasis: true,
); );
globals.printStatus( globals.printStatus(
'For more information see https://dart.dev/null-safety/unsound-null-safety', 'Dart 3 will only support sound null safety, see https://dart.dev/null-safety',
); );
} }
globals.printStatus(''); globals.printStatus('');

View File

@ -615,11 +615,11 @@ class ResidentWebRunner extends ResidentRunner {
_logger!.printStatus('💪 Running with sound null safety 💪', emphasis: true); _logger!.printStatus('💪 Running with sound null safety 💪', emphasis: true);
} else { } else {
_logger!.printStatus( _logger!.printStatus(
'Running with unsound null safety', 'Running without sound null safety ⚠️',
emphasis: true, emphasis: true,
); );
_logger!.printStatus( _logger!.printStatus(
'For more information see https://dart.dev/null-safety/unsound-null-safety', 'Dart 3 will only support sound null safety, see https://dart.dev/null-safety',
); );
} }
} }

View File

@ -1026,11 +1026,11 @@ class HotRunner extends ResidentRunner {
globals.printStatus('💪 Running with sound null safety 💪', emphasis: true); globals.printStatus('💪 Running with sound null safety 💪', emphasis: true);
} else { } else {
globals.printStatus( globals.printStatus(
'Running with unsound null safety', 'Running without sound null safety ⚠️',
emphasis: true, emphasis: true,
); );
globals.printStatus( globals.printStatus(
'For more information see https://dart.dev/null-safety/unsound-null-safety', 'Dart 3 will only support sound null safety, see https://dart.dev/null-safety',
); );
} }
globals.printStatus(''); globals.printStatus('');

View File

@ -69,8 +69,8 @@ void main() {
); );
FakeBuildSubCommand().test(unsound); FakeBuildSubCommand().test(unsound);
expect( expect(testLogger.statusText,
testLogger.statusText, contains('Building without sound null safety')); contains('Building without sound null safety ⚠️'));
testLogger.clear(); testLogger.clear();
FakeBuildSubCommand().test(sound); FakeBuildSubCommand().test(sound);