Unverified Commit 3397338c authored by Leaf Petersen's avatar Leaf Petersen Committed by GitHub

Fix use of Future<void> as a Future<bool> (#18843)

* Fix use of Future<void> as a Future<bool>
parent 127d1f85
...@@ -37,7 +37,7 @@ class IOSEmulator extends Emulator { ...@@ -37,7 +37,7 @@ class IOSEmulator extends Emulator {
@override @override
Future<void> launch() async { Future<void> launch() async {
Future<void> launchSimulator(List<String> additionalArgs) async { Future<bool> launchSimulator(List<String> additionalArgs) async {
final List<String> args = <String>['open'] final List<String> args = <String>['open']
.followedBy(additionalArgs) .followedBy(additionalArgs)
.followedBy(<String>['-a', getSimulatorPath()]); .followedBy(<String>['-a', getSimulatorPath()]);
...@@ -52,11 +52,11 @@ class IOSEmulator extends Emulator { ...@@ -52,11 +52,11 @@ class IOSEmulator extends Emulator {
// First run with `-n` to force a device to boot if there isn't already one // First run with `-n` to force a device to boot if there isn't already one
if (!await launchSimulator(<String>['-n'])) if (!await launchSimulator(<String>['-n']))
return false; return;
// Run again to force it to Foreground (using -n doesn't force existing // Run again to force it to Foreground (using -n doesn't force existing
// devices to the foreground) // devices to the foreground)
return launchSimulator(<String>[]); await launchSimulator(<String>[]);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment