screenshot method
Capture a PNG to path (works headless); returns saved path + pixel size (also the tap-ratio reference: ratio = pixel / size) or an error.
Implementation
Future<ScreenshotResult> screenshot(String udid, String path) async {
final err = await _run(['io', udid, 'screenshot', path]);
if (err != null) return ScreenshotResult(error: err);
final size = pngSize(path);
return ScreenshotResult(path: path, width: size?.$1, height: size?.$2);
}