Skip to content
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

WIP android: Renders properly content outside viewports #2390

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lucasdessy
Copy link

@lucasdessy lucasdessy commented Nov 1, 2024

  • When using InAppWebViewController.takeScreenshot on large contents, contents outside the viewport was not being rendered (resulted in transparent widgets). Tested on Small Phone (720x1280) APIs 25 and 28.
  • This PR uses layout to pre-render the WebView before it is drawn. It also disables the scrollbars as it was being shown on the bitmap.
  • It is not very well tested since this was made to fit a personal need.

Connection with issue(s)

Resolve issue #???

Connected to #???

Testing and Review Notes

Screenshots or Videos

To Do

  • double check the original issue to confirm it is fully satisfied
  • add testing notes and screenshots in PR description to help guide reviewers
  • request the "UX" team perform a design review (if/when applicable)

@pichillilorenzo
Copy link
Owner

In the new release 6.2.0-beta.1 I added InAppWebViewController.enableSlowWholeDocumentDraw static method for Android which allows to take screenshots outside the visible viewport.
More info about it: https://pub.dev/documentation/flutter_inappwebview/6.2.0-beta.1/flutter_inappwebview/PlatformInAppWebViewController/enableSlowWholeDocumentDraw.html

So this PR shouldn't be necessary.

@lucasdessy
Copy link
Author

Hey thanks for answering. I did use the master version, and enabling this flag didn’t change anything at all. As you can see my fork already have your implementation of InAppWebViewController.enableSlowWholeDocumentDraw on android but weirdly enough it doesn’t work. On my use, I did have to also use this method to get my draw completely done. I will try to get you more details later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants