Commit 6ba5b0c1 authored by Lorenzo Pichilli's avatar Lorenzo Pichilli

Added pause and resume methods for Android, Added pauseTimers and resumeTimers...

Added pause and resume methods for Android, Added pauseTimers and resumeTimers methods, Added new historyUrl optional parameter only for Android, fix #202, should fix #201
parent ade4480c
......@@ -6,7 +6,7 @@ about: Something is crashing or not working as intended
## Environment
**App version:** <!-- Add branch if necessary -->
**Plugin version:** <!-- Add branch if necessary -->
**Android version:** <!-- If customize ROM, write which -->
**Device information:** <!-- Manufacturer and model -->
**Flutter version:** <!-- Flutter version used -->
......
......@@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/example/ios/.symlinks/plugins/flutter_inappwebview" vcs="Git" />
</component>
</project>
\ No newline at end of file
This diff is collapsed.
## 2.1.0
- Added `pause` and `resume` methods for Android.
- Added `pauseTimers` and `resumeTimers` methods.
- Added new `historyUrl` optional parameter for `loadData` and `openData` methods and `InAppWebViewInitialData` class. It is used only on Android.
- Fix "problems with onReceivedHttpAuthRequest when initialData is used" [#201](https://github.com/pichillilorenzo/flutter_inappwebview/issues/201)
- Fix "System ui (status bar and navigation bar) doesn't hide automatically" [#202](https://github.com/pichillilorenzo/flutter_inappwebview/issues/202)
## 2.0.1+1
- Fixed error "java.lang.ClassCastException: $Proxy1 cannot be cast to android.view.WindowManagerImpl" on Android when using native alert dialogs
......
......@@ -427,12 +427,12 @@ Instead, on the `onLoadStop` WebView event, you can use `callHandler` directly:
* `onLoadHttpError`: Event fired when the InAppWebView main page receives an HTTP error.
* `onProgressChanged`: Event fired when the current progress of loading a page is changed.
* `onConsoleMessage`: Event fired when the InAppWebView receives a ConsoleMessage.
* `shouldOverrideUrlLoading`: Give the host application a chance to take control when a URL is about to be loaded in the current WebView.
* `onLoadResource`: Event fired when the InAppWebView loads a resource.
* `shouldOverrideUrlLoading`: Give the host application a chance to take control when a URL is about to be loaded in the current WebView (to use this event, the `useShouldOverrideUrlLoading` option must be `true`).
* `onLoadResource`: Event fired when the InAppWebView loads a resource (to use this event, the `useOnLoadResource` option must be `true`).
* `onScrollChanged`: Event fired when the InAppWebView scrolls.
* `onDownloadStart`: Event fired when InAppWebView recognizes and starts a downloadable file.
* `onDownloadStart`: Event fired when InAppWebView recognizes and starts a downloadable file (to use this event, the `useOnDownloadStart` option must be `true`).
* `onLoadResourceCustomScheme`: Event fired when the InAppWebView finds the `custom-scheme` while loading a resource. Here you can handle the url request and return a CustomSchemeResponse to load a specific resource encoded to `base64`.
* `onTargetBlank`: Event fired when the InAppWebView tries to open a link with `target="_blank"`.
* `onTargetBlank`: Event fired when the InAppWebView tries to open a link with `target="_blank"` (to use this event, the `useOnTargetBlank` option must be `true`).
* `onGeolocationPermissionsShowPrompt`: Event that notifies the host application that web content from the specified origin is attempting to use the Geolocation API, but no permission state is currently set for that origin (available only on Android).
* `onJsAlert`: Event fired when javascript calls the `alert()` method to display an alert dialog.
* `onJsConfirm`: Event fired when javascript calls the `confirm()` method to display a confirm dialog.
......@@ -442,10 +442,10 @@ Instead, on the `onLoadStop` WebView event, you can use `callHandler` directly:
* `onReceivedServerTrustAuthRequest`: Event fired when the WebView need to perform server trust authentication (certificate validation).
* `onReceivedClientCertRequest`: Notify the host application to handle an SSL client certificate request.
* `onFindResultReceived`: Event fired as find-on-page operations progress.
* `shouldInterceptAjaxRequest`: Event fired when an `XMLHttpRequest` is sent to a server.
* `onAjaxReadyStateChange`: Event fired whenever the `readyState` attribute of an `XMLHttpRequest` changes.
* `onAjaxProgress`: Event fired as an `XMLHttpRequest` progress.
* `shouldInterceptFetchRequest`: Event fired when a request is sent to a server through [Fetch API](https://developer.mozilla.org/it/docs/Web/API/Fetch_API).
* `shouldInterceptAjaxRequest`: Event fired when an `XMLHttpRequest` is sent to a server (to use this event, the `useShouldInterceptAjaxRequest` option must be `true`).
* `onAjaxReadyStateChange`: Event fired whenever the `readyState` attribute of an `XMLHttpRequest` changes (to use this event, the `useShouldInterceptAjaxRequest` option must be `true`).
* `onAjaxProgress`: Event fired as an `XMLHttpRequest` progress (to use this event, the `useShouldInterceptAjaxRequest` option must be `true`).
* `shouldInterceptFetchRequest`: Event fired when a request is sent to a server through [Fetch API](https://developer.mozilla.org/it/docs/Web/API/Fetch_API) (to use this event, the `useShouldInterceptFetchRequest` option must be `true`).
* `onNavigationStateChange`: Event fired when the navigation state of the InAppWebView changes.
* `onPermissionRequest`: Event fired when the webview is requesting permission to access the specified resources and the permission currently isn't granted or denied (available only on Android).
......
......@@ -76,7 +76,8 @@ public class FlutterWebView implements PlatformView, MethodCallHandler {
String mimeType = initialData.get("mimeType");
String encoding = initialData.get("encoding");
String baseUrl = initialData.get("baseUrl");
webView.loadDataWithBaseURL(baseUrl, data, mimeType, encoding, null);
String historyUrl = initialData.get("historyUrl");
webView.loadDataWithBaseURL(baseUrl, data, mimeType, encoding, historyUrl);
}
else
webView.loadUrl(initialUrl, initialHeaders);
......@@ -117,9 +118,10 @@ public class FlutterWebView implements PlatformView, MethodCallHandler {
String mimeType = (String) call.argument("mimeType");
String encoding = (String) call.argument("encoding");
String baseUrl = (String) call.argument("baseUrl");
String historyUrl = (String) call.argument("historyUrl");
if (webView != null)
webView.loadData(data, mimeType, encoding, baseUrl, result);
webView.loadData(data, mimeType, encoding, baseUrl, historyUrl, result);
else
result.success(false);
}
......@@ -300,6 +302,38 @@ public class FlutterWebView implements PlatformView, MethodCallHandler {
}
result.success(true);
break;
case "pause":
if (webView != null) {
webView.onPause();
result.success(true);
} else {
result.success(false);
}
break;
case "resume":
if (webView != null) {
webView.onResume();
result.success(true);
} else {
result.success(false);
}
break;
case "pauseTimers":
if (webView != null) {
webView.pauseTimers();
result.success(true);
} else {
result.success(false);
}
break;
case "resumeTimers":
if (webView != null) {
webView.resumeTimers();
result.success(true);
} else {
result.success(false);
}
break;
default:
result.notImplemented();
}
......
......@@ -153,7 +153,8 @@ public class InAppBrowser implements MethodChannel.MethodCallHandler {
String mimeType = (String) call.argument("mimeType");
String encoding = (String) call.argument("encoding");
String baseUrl = (String) call.argument("baseUrl");
openData(activity, uuid, options, data, mimeType, encoding, baseUrl);
String historyUrl = (String) call.argument("historyUrl");
openData(activity, uuid, options, data, mimeType, encoding, baseUrl, historyUrl);
result.success(true);
}
});
......@@ -180,7 +181,8 @@ public class InAppBrowser implements MethodChannel.MethodCallHandler {
String mimeType = (String) call.argument("mimeType");
String encoding = (String) call.argument("encoding");
String baseUrl = (String) call.argument("baseUrl");
loadData(uuid, data, mimeType, encoding, baseUrl, result);
String historyUrl = (String) call.argument("historyUrl");
loadData(uuid, data, mimeType, encoding, baseUrl, historyUrl, result);
}
break;
case "loadFile":
......@@ -460,7 +462,7 @@ public class InAppBrowser implements MethodChannel.MethodCallHandler {
result.error(LOG_TAG, "No WebView fallback declared.", null);
}
public void openData(Activity activity, String uuid, HashMap<String, Object> options, String data, String mimeType, String encoding, String baseUrl) {
public void openData(Activity activity, String uuid, HashMap<String, Object> options, String data, String mimeType, String encoding, String baseUrl, String historyUrl) {
Intent intent = new Intent(activity, InAppBrowserActivity.class);
Bundle extras = new Bundle();
......@@ -471,6 +473,7 @@ public class InAppBrowser implements MethodChannel.MethodCallHandler {
extras.putString("mimeType", mimeType);
extras.putString("encoding", encoding);
extras.putString("baseUrl", baseUrl);
extras.putString("historyUrl", historyUrl);
intent.putExtras(extras);
activity.startActivity(intent);
......@@ -513,10 +516,10 @@ public class InAppBrowser implements MethodChannel.MethodCallHandler {
inAppBrowserActivity.postUrl(url, postData, result);
}
public void loadData(String uuid, String data, String mimeType, String encoding, String baseUrl, Result result) {
public void loadData(String uuid, String data, String mimeType, String encoding, String baseUrl, String historyUrl, Result result) {
InAppBrowserActivity inAppBrowserActivity = webViewActivities.get(uuid);
if (inAppBrowserActivity != null)
inAppBrowserActivity.loadData(data, mimeType, encoding, baseUrl, result);
inAppBrowserActivity.loadData(data, mimeType, encoding, baseUrl, historyUrl, result);
}
public void loadFile(String uuid, String url, Map<String, String> headers, Result result) {
......
......@@ -88,7 +88,8 @@ public class InAppBrowserActivity extends AppCompatActivity {
String mimeType = b.getString("mimeType");
String encoding = b.getString("encoding");
String baseUrl = b.getString("baseUrl");
webView.loadDataWithBaseURL(baseUrl, data, mimeType, encoding, null);
String historyUrl = b.getString("historyUrl");
webView.loadDataWithBaseURL(baseUrl, data, mimeType, encoding, historyUrl);
}
Map<String, Object> obj = new HashMap<>();
......@@ -228,9 +229,9 @@ public class InAppBrowserActivity extends AppCompatActivity {
}
}
public void loadData(String data, String mimeType, String encoding, String baseUrl, MethodChannel.Result result) {
public void loadData(String data, String mimeType, String encoding, String baseUrl, String historyUrl, MethodChannel.Result result) {
if (webView != null) {
webView.loadData(data, mimeType, encoding, baseUrl, result);
webView.loadData(data, mimeType, encoding, baseUrl, historyUrl, result);
} else {
result.error(LOG_TAG, "webView is null", null);
}
......
......@@ -794,8 +794,8 @@ final public class InAppWebView extends InputAwareWebView {
result.success(true);
}
public void loadData(String data, String mimeType, String encoding, String baseUrl, MethodChannel.Result result) {
loadDataWithBaseURL(baseUrl, data, mimeType, encoding, null);
public void loadData(String data, String mimeType, String encoding, String baseUrl, String historyUrl, MethodChannel.Result result) {
loadDataWithBaseURL(baseUrl, data, mimeType, encoding, historyUrl);
result.success(true);
}
......
......@@ -98,7 +98,16 @@ public class InAppWebViewChromeClient extends WebChromeClient implements PluginR
this.mCustomViewCallback = paramCustomViewCallback;
this.mCustomView.setBackgroundColor(Color.parseColor("#000000"));
((FrameLayout) decorView).addView(this.mCustomView, new FrameLayout.LayoutParams(-1, -1));
decorView.setSystemUiVisibility(3846 | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
decorView.setSystemUiVisibility(
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
// Set the content to appear under the system bars so that the
// content doesn't resize when the system bars hide and show.
| View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
// Hide the nav bar and status bar
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN);
}
@Override
......
......@@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Flutter InAppBrowser</title>
<title>Flutter InAppWebView</title>
<link rel="stylesheet" href="https://getbootstrap.com/docs/4.3/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
......@@ -14,7 +14,7 @@
<div class="cover-container d-flex w-100 h-100 p-3 mx-auto flex-column">
<header class="masthead mb-auto">
<div class="inner">
<h3 class="masthead-brand">Flutter InAppBrowser</h3>
<h3 class="masthead-brand">Flutter InAppWebView</h3>
<nav class="nav nav-masthead justify-content-center">
<a class="nav-link active" href="index.html">Home</a>
<a class="nav-link" href="page-1.html">Page 1</a>
......@@ -37,5 +37,6 @@
</div>
</footer>
</div>
<script src="js/main.js"></script>
</body>
</html>
\ No newline at end of file
function add(a, b) {
return a + b;
}
console.log(add(10, 20));
\ No newline at end of file
......@@ -46,6 +46,7 @@ flutter:
- assets/index.html
- assets/page-1.html
- assets/page-2.html
- assets/js/
- assets/css/
- assets/images/
- assets/favicon.ico
......
......@@ -318,6 +318,18 @@ public class FlutterWebViewController: NSObject, FlutterPlatformView {
}
result(true)
break
case "pauseTimers":
if webView != nil {
webView!.pauseTimers()
}
result(true)
break
case "resumeTimers":
if webView != nil {
webView!.resumeTimers()
}
result(true)
break
case "removeFromSuperview":
webView!.removeFromSuperview()
result(true)
......
......@@ -689,6 +689,8 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
static var credentialsProposed: [URLCredential] = []
var lastScrollX: CGFloat = 0
var lastScrollY: CGFloat = 0
var isPausedTimers = false
var isPausedTimersCompletionHandler: (() -> Void)?
init(frame: CGRect, configuration: WKWebViewConfiguration, IABController: InAppBrowserWebViewController?, IAWController: FlutterWebViewController?) {
......@@ -705,6 +707,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
}
public func prepare() {
addObserver(self,
forKeyPath: #keyPath(WKWebView.estimatedProgress),
options: .new,
......@@ -1632,6 +1635,11 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
public func webView(_ webView: WKWebView, runJavaScriptAlertPanelWithMessage message: String,
initiatedByFrame frame: WKFrameInfo, completionHandler: @escaping () -> Void) {
if (isPausedTimers) {
isPausedTimersCompletionHandler = completionHandler
return
}
onJsAlert(message: message, result: {(result) -> Void in
if result is FlutterError {
print((result as! FlutterError).message)
......@@ -2134,29 +2142,44 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
return (IABController != nil) ? SwiftFlutterPlugin.instance!.channel! : ((IAWController != nil) ? IAWController!.channel! : nil);
}
func findAllAsync(find: String?, completionHandler: ((Any?, Error?) -> Void)?) {
public func findAllAsync(find: String?, completionHandler: ((Any?, Error?) -> Void)?) {
let startSearch = "wkwebview_FindAllAsync('\(find ?? "")');"
evaluateJavaScript(startSearch, completionHandler: completionHandler)
}
func findNext(forward: Bool, completionHandler: ((Any?, Error?) -> Void)?) {
public func findNext(forward: Bool, completionHandler: ((Any?, Error?) -> Void)?) {
evaluateJavaScript("wkwebview_FindNext(\(forward ? "true" : "false"));", completionHandler: completionHandler)
}
func clearMatches(completionHandler: ((Any?, Error?) -> Void)?) {
public func clearMatches(completionHandler: ((Any?, Error?) -> Void)?) {
evaluateJavaScript("wkwebview_ClearMatches();", completionHandler: completionHandler)
}
func scrollTo(x: Int, y: Int) {
public func scrollTo(x: Int, y: Int) {
scrollView.setContentOffset(CGPoint(x: x, y: y), animated: false)
}
func scrollBy(x: Int, y: Int) {
public func scrollBy(x: Int, y: Int) {
let newX = CGFloat(x) + scrollView.contentOffset.x
let newY = CGFloat(y) + scrollView.contentOffset.y
scrollView.setContentOffset(CGPoint(x: newX, y: newY), animated: false)
}
public func pauseTimers() {
isPausedTimers = true
let script = "alert();";
self.evaluateJavaScript(script, completionHandler: nil)
}
public func resumeTimers() {
if let completionHandler = isPausedTimersCompletionHandler {
completionHandler()
isPausedTimersCompletionHandler = nil
}
isPausedTimers = false
}
public override func removeFromSuperview() {
configuration.userContentController.removeScriptMessageHandler(forName: "consoleLog")
configuration.userContentController.removeScriptMessageHandler(forName: "consoleDebug")
......@@ -2175,5 +2198,6 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, WKNavi
IAWController?.channel?.setMethodCallHandler(nil)
IABController?.webView = nil
IAWController?.webView = nil
isPausedTimersCompletionHandler = nil
}
}
......@@ -162,9 +162,11 @@ class InAppBrowser {
///Opens a new [InAppBrowser] instance with [data] as a content, using [baseUrl] as the base URL for it.
///
///The [mimeType] parameter specifies the format of the data.
///The [mimeType] parameter specifies the format of the data. The default value is `"text/html"`.
///
///The [encoding] parameter specifies the encoding of the data.
///The [encoding] parameter specifies the encoding of the data. The default value is `"utf8"`.
///
///The [historyUrl] parameter is the URL to use as the history entry. The default value is `about:blank`. If non-null, this must be a valid URL. This parameter is used only on Android.
///
///The [options] parameter specifies the options for the [InAppBrowser].
Future<void> openData(
......@@ -172,6 +174,7 @@ class InAppBrowser {
String mimeType = "text/html",
String encoding = "utf8",
String baseUrl = "about:blank",
String historyUrl = "about:blank",
InAppBrowserClassOptions options}) async {
assert(data != null);
......
......@@ -1115,13 +1115,18 @@ class InAppWebViewController {
}
///Loads the given [data] into this WebView, using [baseUrl] as the base URL for the content.
///The [mimeType] parameter specifies the format of the data.
///The [encoding] parameter specifies the encoding of the data.
///
///The [mimeType] parameter specifies the format of the data. The default value is `"text/html"`.
///
///The [encoding] parameter specifies the encoding of the data. The default value is `"utf8"`.
///
///The [historyUrl] parameter is the URL to use as the history entry. The default value is `about:blank`. If non-null, this must be a valid URL. This parameter is used only on Android.
Future<void> loadData(
{@required String data,
String mimeType = "text/html",
String encoding = "utf8",
String baseUrl = "about:blank"}) async {
String baseUrl = "about:blank",
String historyUrl = "about:blank"}) async {
assert(data != null);
Map<String, dynamic> args = <String, dynamic>{};
if (_inAppBrowserUuid != null && _inAppBrowser != null) {
......@@ -1132,6 +1137,7 @@ class InAppWebViewController {
args.putIfAbsent('mimeType', () => mimeType);
args.putIfAbsent('encoding', () => encoding);
args.putIfAbsent('baseUrl', () => baseUrl);
args.putIfAbsent('historyUrl', () => historyUrl);
await _channel.invokeMethod('loadData', args);
}
......@@ -1673,6 +1679,51 @@ class InAppWebViewController {
await _channel.invokeMethod('scrollBy', args);
}
///Does a best-effort attempt to pause any processing that can be paused safely, such as animations and geolocation. Note that this call does not pause JavaScript.
///To pause JavaScript globally, use [pauseTimers()]. To resume WebView, call [resume()].
///
///**NOTE**: available only on Android.
Future<void> pause() async {
Map<String, dynamic> args = <String, dynamic>{};
if (_inAppBrowserUuid != null && _inAppBrowser != null) {
_inAppBrowser.throwIsNotOpened();
args.putIfAbsent('uuid', () => _inAppBrowserUuid);
}
await _channel.invokeMethod('pause', args);
}
///Resumes a WebView after a previous call to [pause()].
///
///**NOTE**: available only on Android.
Future<void> resume() async {
Map<String, dynamic> args = <String, dynamic>{};
if (_inAppBrowserUuid != null && _inAppBrowser != null) {
_inAppBrowser.throwIsNotOpened();
args.putIfAbsent('uuid', () => _inAppBrowserUuid);
}
await _channel.invokeMethod('resume', args);
}
///Pauses all layout, parsing, and JavaScript timers for all WebViews. This is a global requests, not restricted to just this WebView. This can be useful if the application has been paused.
Future<void> pauseTimers() async {
Map<String, dynamic> args = <String, dynamic>{};
if (_inAppBrowserUuid != null && _inAppBrowser != null) {
_inAppBrowser.throwIsNotOpened();
args.putIfAbsent('uuid', () => _inAppBrowserUuid);
}
await _channel.invokeMethod('pauseTimers', args);
}
///Resumes all layout, parsing, and JavaScript timers for all WebViews. This will resume dispatching all timers.
Future<void> resumeTimers() async {
Map<String, dynamic> args = <String, dynamic>{};
if (_inAppBrowserUuid != null && _inAppBrowser != null) {
_inAppBrowser.throwIsNotOpened();
args.putIfAbsent('uuid', () => _inAppBrowserUuid);
}
await _channel.invokeMethod('resumeTimers', args);
}
/*Future<void> dispose() async {
Map<String, dynamic> args = <String, dynamic>{};
if (Platform.isIOS)
......
......@@ -82,26 +82,36 @@ class LoadedResource {
}
///Initial [data] as a content for an [InAppWebView] instance, using [baseUrl] as the base URL for it.
///The [mimeType] property specifies the format of the data.
///The [encoding] property specifies the encoding of the data.
class InAppWebViewInitialData {
///A String of data in the given encoding.
String data;
///The MIME type of the data, e.g. "text/html". The default value is `"text/html"`.
String mimeType;
///The encoding of the data. The default value is `"utf8"`.
String encoding;
///The URL to use as the page's base URL. The default value is `about:blank`.
String baseUrl;
///The URL to use as the history entry. The default value is `about:blank`. If non-null, this must be a valid URL. This parameter is used only on Android.
String historyUrl;
InAppWebViewInitialData(
{@required this.data,
this.mimeType = "text/html",
this.encoding = "utf8",
this.baseUrl = "about:blank"});
this.baseUrl = "about:blank",
this.historyUrl = "about:blank"});
Map<String, String> toMap() {
return {
"data": data,
"mimeType": mimeType,
"encoding": encoding,
"baseUrl": baseUrl
"baseUrl": baseUrl,
"historyUrl": historyUrl
};
}
}
......
......@@ -94,6 +94,11 @@ appAuthBasic.use((req, res, next) => {
}
})
appAuthBasic.use(express.static(__dirname + '/public'));
appAuthBasic.get('/test-index', (req, res) => {
res.sendFile(__dirname + '/public/index.html');
});
appAuthBasic.get("/", (req, res) => {
console.log(JSON.stringify(req.headers))
res.send(`
......@@ -120,6 +125,11 @@ app.use(cors());
// Parse JSON bodies (as sent by API clients)
app.use(express.json());
app.use(express.static(__dirname + '/public'));
app.get('/test-index', (req, res) => {
res.sendFile(__dirname + '/public/index.html');
});
app.get("/", (req, res) => {
console.log(JSON.stringify(req.headers))
res.send(`
......
body {
background: yellow;
color: #333;
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Flutter InAppWebView</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<p>TEST</p>
<div id="test"></div>
<script src="js/main.js"></script>
</body>
</html>
\ No newline at end of file
document.querySelector("#test").innerHTML = "this is a test";
\ No newline at end of file
name: flutter_inappwebview
description: A Flutter plugin that allows you to add an inline webview or open an in-app browser window.
version: 2.0.1+1
version: 2.1.0
author: Lorenzo Pichilli <pichillilorenzo@gmail.com>
homepage: https://github.com/pichillilorenzo/flutter_inappwebview
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment