From 3397338cdd89a6da57b088508c87002faf17cf5e Mon Sep 17 00:00:00 2001 From: Leaf Petersen Date: Tue, 10 Jul 2018 11:10:48 -0700 Subject: [PATCH] Fix use of Future as a Future (#18843) * Fix use of Future as a Future --- packages/flutter_tools/lib/src/ios/ios_emulators.dart | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/flutter_tools/lib/src/ios/ios_emulators.dart b/packages/flutter_tools/lib/src/ios/ios_emulators.dart index 3608bad0af..0916a3c341 100644 --- a/packages/flutter_tools/lib/src/ios/ios_emulators.dart +++ b/packages/flutter_tools/lib/src/ios/ios_emulators.dart @@ -37,7 +37,7 @@ class IOSEmulator extends Emulator { @override Future launch() async { - Future launchSimulator(List additionalArgs) async { + Future launchSimulator(List additionalArgs) async { final List args = ['open'] .followedBy(additionalArgs) .followedBy(['-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(['-n'])) - return false; - + return; + // Run again to force it to Foreground (using -n doesn't force existing // devices to the foreground) - return launchSimulator([]); + await launchSimulator([]); } }