Last active
August 14, 2024 11:24
-
-
Save rohankandwal/97e30341210758a911be73413978b04a to your computer and use it in GitHub Desktop.
Loading a url into the webview
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final _webViewPlugin = FlutterWebviewPlugin(); | |
@override | |
Widget build(BuildContext context) { | |
return WillPopScope( | |
child: WebviewScaffold( | |
url: "https://www.google.com", | |
withZoom: false, | |
withLocalStorage: true, | |
withJavascript: true, | |
appCacheEnabled: true, | |
appBar: AppBar( | |
title: Text("Title"), | |
), | |
), | |
onWillPop: () { | |
return _webViewPlugin.close(); | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment