takeScreenshot function
- String path
Implementation
Future<bool> takeScreenshot(String path) async {
bool result = false;
if (Platform.isAndroid) {
result = takeScreenshotAndroid(path);
} else if (Platform.isIOS) {
result = await takeScreenshotIosAsync(path);
}
return result;
}