Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/webview_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.0.2+1

* Enable zoom in android devices.

## 2.0.2

* Fixes bug where text fields are hidden behind the keyboard
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,18 @@ public void onProgressChanged(WebView view, int progress) {
webView.getSettings().setDomStorageEnabled(true);
webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);

// Zoom support.
// // Zooms out the content to fit on screen by width.
webView.getSettings().setLoadWithOverviewMode(true);
// // It loads the WebView with the attributes defined in the meta tag of the webpage.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note format is not correctly.

Suggested change
// // It loads the WebView with the attributes defined in the meta tag of the webpage.
// It loads the WebView with the attributes defined in the meta tag of the webpage.

// // So it scales the webpage as defined in the html.
webView.getSettings().setUseWideViewPort(true);
// // Pop-up zoom controls disabled. This is a temporary stop because dialog is not responding to touch events.
webView.getSettings().setDisplayZoomControls(false);
// // Enable zoom.
webView.getSettings().setBuiltInZoomControls(true);


// Multi windows is set with FlutterWebChromeClient by default to handle internal bug: b/159892679.
webView.getSettings().setSupportMultipleWindows(true);
webView.setWebChromeClient(new FlutterWebChromeClient());
Expand Down
2 changes: 1 addition & 1 deletion packages/webview_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: webview_flutter
description: A Flutter plugin that provides a WebView widget on Android and iOS.
homepage: https://github.com/flutter/plugins/tree/master/packages/webview_flutter
version: 2.0.2
version: 2.0.2+1

environment:
sdk: ">=2.12.0-259.9.beta <3.0.0"
Expand Down