Fix use of Future<void> as a Future<bool> (#18843)
* Fix use of Future<void> as a Future<bool>
This commit is contained in:
@@ -37,7 +37,7 @@ class IOSEmulator extends Emulator {
|
||||
|
||||
@override
|
||||
Future<void> launch() async {
|
||||
Future<void> launchSimulator(List<String> additionalArgs) async {
|
||||
Future<bool> launchSimulator(List<String> additionalArgs) async {
|
||||
final List<String> args = <String>['open']
|
||||
.followedBy(additionalArgs)
|
||||
.followedBy(<String>['-a', getSimulatorPath()]);
|
||||
@@ -52,11 +52,11 @@ class IOSEmulator extends Emulator {
|
||||
|
||||
// First run with `-n` to force a device to boot if there isn't already one
|
||||
if (!await launchSimulator(<String>['-n']))
|
||||
return false;
|
||||
|
||||
return;
|
||||
|
||||
// Run again to force it to Foreground (using -n doesn't force existing
|
||||
// devices to the foreground)
|
||||
return launchSimulator(<String>[]);
|
||||
await launchSimulator(<String>[]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user