-
Notifications
You must be signed in to change notification settings - Fork 139
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
how to capture a scrollview #10
Comments
If you are trying take a full screenshot of a listview or whatever widget that scrolls.. you might see this post |
Can you add the example from your source code where you managed to get the scrollshot ? .. It would help a lot. |
@SachinGanesh can you look into this issue pls .. I saw that you already closed an issue that covered the same problem. It would be really helpful if you could provide a little snippet of source code on how you managed to solve the problem because I can't get it to work. |
Sure! Let me remember where i use this package and i`ll post here. Stay tuned. |
@stefanpfahler you can do something like this.. Wrap your list with Screenshot widget, but at this point the screenshot can't reach all items on the list.. (my list is being build on the StreamBuilder widget). So, just wrap your Scrollable widget (or his father) with SingleChildScrollView, like this: |
Great! Thank you very much! |
Hi |
@jagan999 hmm, are you trying to take a screenshot of entire hierarchy or just the ListView ? Can you post some example of your code here ?
|
I'm trying to get the screenshot only of the ListView...Like you mentioned previously, I tried wrapping Screenshot widget inside SingleChildScrollView and it still only takes the screenshot of the visible portion of the ListView. Here's the snippet of my code Card buildDetailsCard(
} |
@jagan999 Sorry for the delay.. i just forget one point. In your ListView that you wanna take a full screenshot, put a NeverScrollableScrollPhysics on it, then what is going to take control of the scrolling is the SingleChildScrollView. So your code will be like this: Full code: http://dontpad.com/jagan999 And the screenshot: Hope this helps you! |
Thank you. This fix worked wonderfully. |
I've Been Using SceenShot Package But have Founded Same Problem. I have Used Stack() in Which First Container is Static background Image and Second is 10 static Containers with SingleChildViewScrollView |
@mohitarora7272 did you find a solution to your specific use case with slivers? |
With version 1.2.3 and flutter 2.2.3, using |
Hello how can print all widgets in pageview ? Do you have any idea? |
`body: SafeArea(
Yes, I used the above code to achieve this at my end after lots of research on google. I have used SingleChildScrollView instead of CustomScrollView in my case and its works. Hope this will also help you. Thanks |
Anyway to do this without a scrollview before screenshot widget ? |
I am able to get full ScreenShot from |
how to achieve same results but using screenshotController.captureFromWidget |
|
@LeiYao123 Thank you, this worked fine AF. |
what if the hieght is not set how would i achieve that then? |
This works! I've discovered that the quality is a bit lower. But ok. |
No description provided.
The text was updated successfully, but these errors were encountered: