|
|
@@ -97,6 +97,7 @@ public class FlutterWebviewPlugin implements MethodCallHandler, PluginRegistry.A
|
|
|
Map<String, String> headers = call.argument("headers");
|
|
|
boolean scrollBar = call.argument("scrollBar");
|
|
|
boolean allowFileURLs = call.argument("allowFileURLs");
|
|
|
+ boolean geolocationEnabled = call.argument("geolocationEnabled");
|
|
|
|
|
|
if (webViewManager == null || webViewManager.closed == true) {
|
|
|
webViewManager = new WebviewManager(activity);
|
|
|
@@ -118,7 +119,8 @@ public class FlutterWebviewPlugin implements MethodCallHandler, PluginRegistry.A
|
|
|
scrollBar,
|
|
|
supportMultipleWindows,
|
|
|
appCacheEnabled,
|
|
|
- allowFileURLs
|
|
|
+ allowFileURLs,
|
|
|
+ geolocationEnabled
|
|
|
);
|
|
|
result.success(null);
|
|
|
}
|
|
|
@@ -147,6 +149,7 @@ public class FlutterWebviewPlugin implements MethodCallHandler, PluginRegistry.A
|
|
|
if (webViewManager != null) {
|
|
|
webViewManager.stopLoading(call, result);
|
|
|
}
|
|
|
+ result.success(null);
|
|
|
}
|
|
|
|
|
|
private void close(MethodCall call, MethodChannel.Result result) {
|
|
|
@@ -163,6 +166,7 @@ public class FlutterWebviewPlugin implements MethodCallHandler, PluginRegistry.A
|
|
|
if (webViewManager != null) {
|
|
|
webViewManager.back(call, result);
|
|
|
}
|
|
|
+ result.success(null);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -172,6 +176,7 @@ public class FlutterWebviewPlugin implements MethodCallHandler, PluginRegistry.A
|
|
|
if (webViewManager != null) {
|
|
|
webViewManager.forward(call, result);
|
|
|
}
|
|
|
+ result.success(null);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -181,6 +186,7 @@ public class FlutterWebviewPlugin implements MethodCallHandler, PluginRegistry.A
|
|
|
if (webViewManager != null) {
|
|
|
webViewManager.reload(call, result);
|
|
|
}
|
|
|
+ result.success(null);
|
|
|
}
|
|
|
|
|
|
private void reloadUrl(MethodCall call, MethodChannel.Result result) {
|
|
|
@@ -188,6 +194,7 @@ public class FlutterWebviewPlugin implements MethodCallHandler, PluginRegistry.A
|
|
|
String url = call.argument("url");
|
|
|
webViewManager.reloadUrl(url);
|
|
|
}
|
|
|
+ result.success(null);
|
|
|
}
|
|
|
|
|
|
private void eval(MethodCall call, final MethodChannel.Result result) {
|
|
|
@@ -208,12 +215,14 @@ public class FlutterWebviewPlugin implements MethodCallHandler, PluginRegistry.A
|
|
|
if (webViewManager != null) {
|
|
|
webViewManager.hide(call, result);
|
|
|
}
|
|
|
+ result.success(null);
|
|
|
}
|
|
|
|
|
|
private void show(MethodCall call, final MethodChannel.Result result) {
|
|
|
if (webViewManager != null) {
|
|
|
webViewManager.show(call, result);
|
|
|
}
|
|
|
+ result.success(null);
|
|
|
}
|
|
|
|
|
|
private void cleanCookies(MethodCall call, final MethodChannel.Result result) {
|