Add missing awaits
This commit is contained in:
committed by
Danny Tuppeny
parent
f850d04ef4
commit
11076bfb43
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ abstract class Emulator {
|
||||
return id == other.id;
|
||||
}
|
||||
|
||||
void launch();
|
||||
Future<void> launch();
|
||||
|
||||
@override
|
||||
String toString() => name;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user