Add missing awaits

This commit is contained in:
Danny Tuppeny
2018-05-07 10:33:53 +01:00
committed by Danny Tuppeny
parent f850d04ef4
commit 11076bfb43
4 changed files with 5 additions and 10 deletions

View File

@@ -41,15 +41,13 @@ class AndroidEmulator extends Emulator {
String get label => _properties['avd.ini.displayname'];
@override
Future<bool> launch() async {
Future<void> launch() async {
final RunResult launchResult =
await runAsync(<String>[getEmulatorPath(), '-avd', id]);
if (launchResult.exitCode != 0) {
printError('$launchResult');
return false;
}
return true;
}
}

View File

@@ -55,7 +55,7 @@ class EmulatorsCommand extends FlutterCommand {
printStatus("More than one emulator matches '$id':\n");
Emulator.printEmulators(emulators);
} else {
emulators.first.launch();
await emulators.first.launch();
}
}

View File

@@ -95,7 +95,7 @@ abstract class Emulator {
return id == other.id;
}
void launch();
Future<void> launch();
@override
String toString() => name;

View File

@@ -35,15 +35,12 @@ class IOSEmulator extends Emulator {
String get label => null;
@override
Future<bool> launch() async {
Future<void> launch() async {
final RunResult launchResult =
await runAsync(<String>['open', '-a', getSimulatorPath()]);
if (launchResult.exitCode != 0) {
printError('$launchResult');
return false;
}
return true;
}
}