Skip to content

feat: Expose setUseWideViewPort on Android (#106999) #9151

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Gustl22
Copy link
Contributor

@Gustl22 Gustl22 commented Apr 25, 2025

The option to set whether the webview should use the wide viewport should be available.
Also the default is changed to false, because this is the expected behavior on Android devices:
https://developer.android.com/develop/ui/views/layout/webapps/targeting
On iOS also the default behavior is to NOT use wide viewport, so this is aligned.

Note: When your page is rendered in a WebView, it doesn't use wide viewport mode by default. You can enable wide viewport mode with setUseWideViewPort().

This also partically solves flutter/flutter#106999, as then the correct height is returned from document.documentElement.scrollHeight; property.

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@Gustl22 Gustl22 requested a review from bparrishMines as a code owner April 25, 2025 14:08
@Gustl22 Gustl22 changed the title 106999 webview expose wide screen feat: Expose setUseWideViewPort on Android (#106999) Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant