capture static method
Implementation
static Future<Uint8List?> capture(
{int maxSize = 400 * 1024}) async {
Uint8List? memoryImage;
try {
var screenShot = await DesktopScreenshot().getScreenshot();
if (screenShot != null && screenShot.isNotEmpty) {
memoryImage = await f.compute(_compress1, [screenShot, maxSize]);
}
return memoryImage;
} catch (e) {
return null;
}
}