Skip to content

Instantly share code, notes, and snippets.

@rohankandwal
Last active November 28, 2019 05:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rohankandwal/97e30341210758a911be73413978b04a to your computer and use it in GitHub Desktop.
Save rohankandwal/97e30341210758a911be73413978b04a to your computer and use it in GitHub Desktop.
Loading a url into the webview
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