takeScreenshot method
Takes a screenshot.
activeWindowOnly: Iftrue, only the currently focused window will be captured. Iffalse, the entire screen will be captured. Default isfalse.
Returns a Uint8List containing the image data in PNG format.
Implementation
Future<Uint8List?> takeScreenshot({bool activeWindowOnly = false}) async {
return await _channel.invokeMethod<Uint8List>('takeScreenshot', {
'activeWindowOnly': activeWindowOnly,
});
}