diff --git a/example/lib/in_app_webiew_example.screen.dart b/example/lib/in_app_webiew_example.screen.dart index 07b57053..ba8418da 100755 --- a/example/lib/in_app_webiew_example.screen.dart +++ b/example/lib/in_app_webiew_example.screen.dart @@ -21,7 +21,8 @@ class _InAppWebViewExampleScreenState extends State { mediaPlaybackRequiresUserGesture: false, allowsInlineMediaPlayback: true, iframeAllow: "camera; microphone", - iframeAllowFullscreen: true + iframeAllowFullscreen: true, + javaScriptEnabled: false ); PullToRefreshController? pullToRefreshController; @@ -113,10 +114,10 @@ class _InAppWebViewExampleScreenState extends State { children: [ InAppWebView( key: webViewKey, - // initialUrlRequest: - // URLRequest(url: Uri.parse("https://flutter.dev")), initialUrlRequest: - URLRequest(url: Uri.parse(Uri.base.toString().replaceFirst("/#/", "/") + 'page.html')), + URLRequest(url: Uri.parse("https://flutter.dev")), + // initialUrlRequest: + // URLRequest(url: Uri.parse(Uri.base.toString().replaceFirst("/#/", "/") + 'page.html')), // initialFile: "assets/index.html", initialUserScripts: UnmodifiableListView([]), initialSettings: settings, @@ -217,6 +218,12 @@ class _InAppWebViewExampleScreenState extends State { webViewController?.reload(); }, ), + ElevatedButton( + child: Icon(Icons.refresh), + onPressed: () { + webViewController?.evaluateJavascript(source: "document.title='test';"); + }, + ), ], ), ])));