Fixes for Dart 2 failures in tests (#18371)

This commit is contained in:
Keerti Parthasarathy
2018-06-12 09:30:10 -07:00
committed by GitHub
parent b8b34def39
commit aecb7d9607
4 changed files with 5 additions and 5 deletions

View File

@@ -510,7 +510,7 @@ class AndroidDevice extends Device {
bool get supportsScreenshot => true;
@override
Future<Null> takeScreenshot(File outputFile) async {
Future<void> takeScreenshot(File outputFile) async {
const String remotePath = '/data/local/tmp/flutter_screenshot.png';
await runCheckedAsync(adbCommandForDevice(<String>['shell', 'screencap', '-p', remotePath]));
await runCheckedAsync(adbCommandForDevice(<String>['pull', remotePath, outputFile.path]));

View File

@@ -277,7 +277,7 @@ abstract class Device {
bool get supportsScreenshot => false;
Future<Null> takeScreenshot(File outputFile) => new Future<Null>.error('unimplemented');
Future<void> takeScreenshot(File outputFile) => new Future<Null>.error('unimplemented');
/// Find the apps that are currently running on this device.
Future<List<DiscoveredApp>> discoverApps() =>

View File

@@ -98,7 +98,7 @@ class IMobileDevice {
Future<Process> startLogger() => runCommand(<String>['idevicesyslog']);
/// Captures a screenshot to the specified outputFile.
Future<Null> takeScreenshot(File outputFile) {
Future<void> takeScreenshot(File outputFile) {
return runCheckedAsync(<String>['idevicescreenshot', outputFile.path]);
}
}

View File

@@ -137,7 +137,7 @@ class SimControl {
return runCheckedAsync(args);
}
Future<Null> takeScreenshot(String deviceId, String outputPath) {
Future<void> takeScreenshot(String deviceId, String outputPath) {
return runCheckedAsync(<String>[_xcrunPath, 'simctl', 'io', deviceId, 'screenshot', outputPath]);
}
}
@@ -458,7 +458,7 @@ class IOSSimulator extends Device {
bool get supportsScreenshot => _xcodeVersionSupportsScreenshot;
@override
Future<Null> takeScreenshot(File outputFile) {
Future<void> takeScreenshot(File outputFile) {
return SimControl.instance.takeScreenshot(id, outputFile.path);
}
}