fix upcoming lint avoid_returning_null_for_void (#23190)
This commit is contained in:
committed by
GitHub
parent
cab7ecb8e5
commit
8b0de38ef8
@@ -40,7 +40,6 @@ Future<void> writeFile(libfs.File outputFile, DevFSContent content) async {
|
||||
outputFile.createSync(recursive: true);
|
||||
final List<int> data = await content.contentsAsBytes();
|
||||
outputFile.writeAsBytesSync(data);
|
||||
return null;
|
||||
}
|
||||
|
||||
Future<void> run(List<String> args) async {
|
||||
|
||||
@@ -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())
|
||||
|
||||
@@ -87,7 +87,7 @@ class CrashReportSender {
|
||||
}) async {
|
||||
try {
|
||||
if (_usage.suppressAnalytics)
|
||||
return null;
|
||||
return;
|
||||
|
||||
printStatus('Sending crash report to Google.');
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -278,10 +278,10 @@ class MemoryIOSink implements IOSink {
|
||||
Future<void> get done => close();
|
||||
|
||||
@override
|
||||
Future<void> close() async => null;
|
||||
Future<void> close() async { }
|
||||
|
||||
@override
|
||||
Future<void> flush() async => null;
|
||||
Future<void> flush() async { }
|
||||
}
|
||||
|
||||
/// A Stdio that collects stdout and supports simulated stdin.
|
||||
|
||||
Reference in New Issue
Block a user