takeScreenshot static method

Future<String?> takeScreenshot()

Captures everything as is shown in user's device.

Returns null if an error occurs. Returns a String with the path of the screenshot.

Implementation

static Future<String?> takeScreenshot() async {
  final String? path = await _channel.invokeMethod('takeScreenshot');
  return path;
}