Commit 11076bfb authored by Danny Tuppeny's avatar Danny Tuppeny Committed by Danny Tuppeny

Add missing awaits

parent f850d04e
...@@ -41,15 +41,13 @@ class AndroidEmulator extends Emulator { ...@@ -41,15 +41,13 @@ class AndroidEmulator extends Emulator {
String get label => _properties['avd.ini.displayname']; String get label => _properties['avd.ini.displayname'];
@override @override
Future<bool> launch() async { Future<void> launch() async {
final RunResult launchResult = final RunResult launchResult =
await runAsync(<String>[getEmulatorPath(), '-avd', id]); await runAsync(<String>[getEmulatorPath(), '-avd', id]);
if (launchResult.exitCode != 0) { if (launchResult.exitCode != 0) {
printError('$launchResult'); printError('$launchResult');
return false;
} }
return true;
} }
} }
......
...@@ -55,7 +55,7 @@ class EmulatorsCommand extends FlutterCommand { ...@@ -55,7 +55,7 @@ class EmulatorsCommand extends FlutterCommand {
printStatus("More than one emulator matches '$id':\n"); printStatus("More than one emulator matches '$id':\n");
Emulator.printEmulators(emulators); Emulator.printEmulators(emulators);
} else { } else {
emulators.first.launch(); await emulators.first.launch();
} }
} }
......
...@@ -95,7 +95,7 @@ abstract class Emulator { ...@@ -95,7 +95,7 @@ abstract class Emulator {
return id == other.id; return id == other.id;
} }
void launch(); Future<void> launch();
@override @override
String toString() => name; String toString() => name;
......
...@@ -35,15 +35,12 @@ class IOSEmulator extends Emulator { ...@@ -35,15 +35,12 @@ class IOSEmulator extends Emulator {
String get label => null; String get label => null;
@override @override
Future<bool> launch() async { Future<void> launch() async {
final RunResult launchResult = final RunResult launchResult =
await runAsync(<String>['open', '-a', getSimulatorPath()]); await runAsync(<String>['open', '-a', getSimulatorPath()]);
if (launchResult.exitCode != 0) { if (launchResult.exitCode != 0) {
printError('$launchResult'); printError('$launchResult');
return false;
} }
return true;
} }
} }
......
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