fix upcoming lint avoid_returning_null_for_void (#23190)

This commit is contained in:
Alexandre Ardhuin
2018-10-17 11:01:37 +02:00
committed by GitHub
parent cab7ecb8e5
commit 8b0de38ef8
13 changed files with 13 additions and 18 deletions

View File

@@ -72,7 +72,7 @@ class Cache {
/// calling [Cache.releaseLockEarly] once they are no longer touching the cache.
static Future<void> lock() async {
if (!_lockEnabled)
return null;
return;
assert(_lock == null);
_lock = await fs.file(fs.path.join(flutterRoot, 'bin', 'cache', 'lockfile')).open(mode: FileMode.write);
bool locked = false;
@@ -201,7 +201,7 @@ class Cache {
Future<void> updateAll() async {
if (!_lockEnabled)
return null;
return;
try {
for (CachedArtifact artifact in _artifacts) {
if (!artifact.isUpToDate())

View File

@@ -87,7 +87,7 @@ class CrashReportSender {
}) async {
try {
if (_usage.suppressAnalytics)
return null;
return;
printStatus('Sending crash report to Google.');

View File

@@ -579,7 +579,7 @@ class _IOSDevicePortForwarder extends DevicePortForwarder {
Future<void> unforward(ForwardedPort forwardedPort) async {
if (!_forwardedPorts.remove(forwardedPort)) {
// Not in list. Nothing to remove.
return null;
return;
}
printTrace('Unforwarding port $forwardedPort');
@@ -591,7 +591,5 @@ class _IOSDevicePortForwarder extends DevicePortForwarder {
} else {
printError('Forwarded port did not have a valid process');
}
return null;
}
}

View File

@@ -109,7 +109,7 @@ class ColdRunner extends ResidentRunner {
}
@override
Future<void> handleTerminalCommand(String code) async => null;
Future<void> handleTerminalCommand(String code) async { }
@override
Future<void> cleanupAfterSignal() async {