fixes to anticipate next Dart linter release (#127211)

The upcoming linter release notices null literals as unnecessary argument values and flags more `type_literal_in_constant_pattern` cases. 

See breakages: https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8780744067138629361/+/u/analyze_flutter_flutter/stdout
This commit is contained in:
Phil Quitslund
2023-05-19 14:27:24 -07:00
committed by GitHub
parent e8b7889dfd
commit d0c0439b8d
13 changed files with 26 additions and 26 deletions

View File

@@ -114,7 +114,7 @@ class StdoutHandler {
}
}
if (message.length <= messageBoundaryKey.length) {
compilerOutput?.complete(null);
compilerOutput?.complete();
return;
}
final int spaceDelimiter = message.lastIndexOf(' ');
@@ -809,7 +809,7 @@ class DefaultResidentCompiler implements ResidentCompiler {
// when outputFilename future is not completed, but stdout is closed
// process has died unexpectedly.
if (_stdoutHandler.compilerOutput?.isCompleted == false) {
_stdoutHandler.compilerOutput?.complete(null);
_stdoutHandler.compilerOutput?.complete();
throwToolExit('the Dart compiler exited unexpectedly.');
}
});

View File

@@ -184,7 +184,7 @@ class CustomDevicePortForwarder extends DevicePortForwarder {
// a port forwarding failure and we complete with a null value.
unawaited(process.exitCode.whenComplete(() {
if (!completer.isCompleted) {
completer.complete(null);
completer.complete();
}
}));