captureAndSaveScreenshot method
Implementation
Future<void> captureAndSaveScreenshot() async {
try {
// Capture the screenshot
final imageBytes = await screenshotController.capture();
// Save the screenshot to the gallery
final result =
await ImageGallerySaver.saveImage(Uint8List.fromList(imageBytes!));
if (result != null && result['isSuccess']) {
} else {}
} catch (e) {
return;
}
}