Updated README.md, updated example
This commit is contained in:
parent
c7c0b9b67f
commit
5cc257895c
16
README.md
16
README.md
@ -13,7 +13,7 @@
|
||||
[](https://github.com/pichillilorenzo/flutter_inappwebview)
|
||||
|
||||
|
||||

|
||||

|
||||
|
||||
A Flutter plugin that allows you to add an inline webview, to use an headless webview, and to open an in-app browser window.
|
||||
|
||||
@ -411,8 +411,7 @@ class _MyAppState extends State<MyApp> {
|
||||
urlController.text = this.url;
|
||||
});
|
||||
},
|
||||
androidOnPermissionRequest: (InAppWebViewController controller,
|
||||
String origin, List<String> resources) async {
|
||||
androidOnPermissionRequest: (controller, origin, resources) async {
|
||||
return PermissionRequestResponse(
|
||||
resources: resources,
|
||||
action: PermissionRequestResponseAction.GRANT);
|
||||
@ -420,15 +419,8 @@ class _MyAppState extends State<MyApp> {
|
||||
shouldOverrideUrlLoading: (controller, navigationAction) async {
|
||||
var uri = navigationAction.request.url!;
|
||||
|
||||
if (![
|
||||
"http",
|
||||
"https",
|
||||
"file",
|
||||
"chrome",
|
||||
"data",
|
||||
"javascript",
|
||||
"about"
|
||||
].contains(uri.scheme)) {
|
||||
if (![ "http", "https", "file", "chrome",
|
||||
"data", "javascript", "about"].contains(uri.scheme)) {
|
||||
if (await canLaunch(url)) {
|
||||
// Launch the App
|
||||
await launch(
|
||||
|
@ -137,8 +137,7 @@ class _InAppWebViewExampleScreenState extends State<InAppWebViewExampleScreen> {
|
||||
urlController.text = this.url;
|
||||
});
|
||||
},
|
||||
androidOnPermissionRequest: (InAppWebViewController controller,
|
||||
String origin, List<String> resources) async {
|
||||
androidOnPermissionRequest: (controller, origin, resources) async {
|
||||
return PermissionRequestResponse(
|
||||
resources: resources,
|
||||
action: PermissionRequestResponseAction.GRANT);
|
||||
|
Loading…
x
Reference in New Issue
Block a user