wrapWithScreenshotCapture method
Widget wrapper que automáticamente captura screenshots en ciertos eventos
Implementation
Widget wrapWithScreenshotCapture({
required Widget child,
required GlobalKey key,
bool captureOnTap = false,
Function(String?)? onScreenshotCaptured,
}) {
return RepaintBoundary(
key: key,
child: GestureDetector(
onTap: captureOnTap
? () async {
final screenshot = await getPNGScreenShot(customKey: key);
onScreenshotCaptured?.call(screenshot);
}
: null,
child: child,
),
);
}