-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Screenshot elements not rendered on screen? #25
Comments
Any update ? |
It would be very helpful for me too! |
It's not possible because this package uses a setState(() => widgetsVisible = true);
await takeScreenshot();
setState(() => widgetsVisible = false); You can use something like overlay or dialog to hide the screen while the screenshot is happening! |
I am currently using the functions from here. It also uses RepaintBoundary, but no real repaints are required. Maybe something similar can be applied here. |
Currently Screenshot support capturing of non rendered elements. You can make use of screenshotController
.captureFromWidget(Container(
padding: const EdgeInsets.all(30.0),
decoration: BoxDecoration(
border:
Border.all(color: Colors.blueAccent, width: 5.0),
color: Colors.redAccent,
),
child: Text("This is an invisible widget")))
.then((capturedImage) {
ShowCapturedWidget(context, capturedImage);
});
|
How do I trigger the captureFromWidget from a method, if the wifget to be captured is the Scaffold? There's my Listview with some elements outside view, and I want them on the screen shot too.
|
Hello @SachinGanesh thanks for the package. I'm trying to screenshot a part of the widget tree but I need to add some custom widgets to the screenshot, those widgets in the screenshot should not be shown on the screen. Is there a way to achieve this using this package?
The text was updated successfully, but these errors were encountered: