-
Notifications
You must be signed in to change notification settings - Fork 936
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 of current webview #181
Comments
@marianoarga Have you found a solution to this problem? |
@erdemyerebasmaz No, I continue without screenshot feature. |
it's not posible to take a screenshot of webview, because of the way plugin works - it's native android activity with flutter view on top. I dont know what your use case is, but you need to fallback to native code of given platform to take screenshot. Therefore, it's not possible with plugin now, closing. |
@charafau I'd like to show a dialog with webview visible on background, afaik this is not possible at the moment. That's why I wanted to show webview's screenshot as a widget and hide the webview till the action from dialog is complete. |
@erdemyerebasmaz I don't know your use-case but I think it's out of scope from this project. I think I should add it in readme, this webview was created to have something to authenticate with oauth2, display simple webpages, until Google will make their own main webview. |
For those who still want to take screenshot of the visible webview and pass it back to Flutter on Android: I solved this issue in this PR of a forked repository. ! Please note that you need to fork the plugin and add these changes, this is not supported by the official plugin as it is out of it's scope ! For our use case, we needed to hide webview to interact with an AlertDialog and show webview's screenshot in the background. Below is a brief and incomplete example on how to use it on your Flutter app, it has code bits that you might never need that is related to our use case.
@marianoarga Please check if you still need this feature. |
@erdemyerebasmaz Thanks for your effort <3, unfortunately I'm kinda out of this app by the moment, but I'm sure this will help many developers using webviews. |
Using RenderRepaintBoundary tecnique to take a screenshot of the webview returns an image with the CircularProgressIndicator widget instead of the already loaded URL, do you have an alternative for this? maybe RenderRepaintBoundary is relading the widget before taking the actual "canvas" image?
The text was updated successfully, but these errors were encountered: