Commit 153ab602 authored by Lorenzo Pichilli's avatar Lorenzo Pichilli

Updated javascript popups events

parent ab0a5cc5
This diff is collapsed.
def PLUGIN = "flutter_inappbrowser";
def ANDROIDX_WARNING = "flutterPluginsAndroidXWarning";
gradle.buildFinished { buildResult ->
if (buildResult.failure && !rootProject.ext.has(ANDROIDX_WARNING)) {
println ' *********************************************************'
println 'WARNING: This version of ' + PLUGIN + ' will break your Android build if it or its dependencies aren\'t compatible with AndroidX.'
println ' See https://goo.gl/CP92wY for more information on the problem and how to fix it.'
println ' This warning prints for all Android build failures. The real root cause of the error may be unrelated.'
println ' *********************************************************'
rootProject.ext.set(ANDROIDX_WARNING, true);
}
}
group 'com.pichillilorenzo.flutter_inappbrowser' group 'com.pichillilorenzo.flutter_inappbrowser'
version '1.0-SNAPSHOT' version '1.0-SNAPSHOT'
......
...@@ -112,11 +112,15 @@ public class InAppWebChromeClient extends WebChromeClient { ...@@ -112,11 +112,15 @@ public class InAppWebChromeClient extends WebChromeClient {
getChannel().invokeMethod("onJsAlert", obj, new MethodChannel.Result() { getChannel().invokeMethod("onJsAlert", obj, new MethodChannel.Result() {
@Override @Override
public void success(Object response) { public void success(Object response) {
String responseMessage = null;
String confirmButtonTitle = null;
if (response != null) {
Map<String, Object> responseMap = (Map<String, Object>) response; Map<String, Object> responseMap = (Map<String, Object>) response;
String responseMessage = (String) responseMap.get("message"); responseMessage = (String) responseMap.get("message");
String confirmButtonTitle = (String) responseMap.get("confirmButtonTitle"); confirmButtonTitle = (String) responseMap.get("confirmButtonTitle");
boolean handledByClient = (boolean) responseMap.get("handledByClient"); Boolean handledByClient = (Boolean) responseMap.get("handledByClient");
if (handledByClient) { if (handledByClient != null && handledByClient) {
Integer action = (Integer) responseMap.get("action"); Integer action = (Integer) responseMap.get("action");
action = action != null ? action : 1; action = action != null ? action : 1;
switch (action) { switch (action) {
...@@ -127,9 +131,31 @@ public class InAppWebChromeClient extends WebChromeClient { ...@@ -127,9 +131,31 @@ public class InAppWebChromeClient extends WebChromeClient {
default: default:
result.cancel(); result.cancel();
} }
} else { return;
}
}
createAlertDialog(view, message, result, responseMessage, confirmButtonTitle);
}
@Override
public void error(String s, String s1, Object o) {
Log.e(LOG_TAG, s + ", " + s1);
result.cancel();
}
@Override
public void notImplemented() {
createAlertDialog(view, message, result, null, null);
}
});
return true;
}
public void createAlertDialog(WebView view, String message, final JsResult result, String responseMessage, String confirmButtonTitle) {
String alertMessage = (responseMessage != null && !responseMessage.isEmpty()) ? responseMessage : message; String alertMessage = (responseMessage != null && !responseMessage.isEmpty()) ? responseMessage : message;
Log.d(LOG_TAG, alertMessage);
DialogInterface.OnClickListener clickListener = new DialogInterface.OnClickListener() { DialogInterface.OnClickListener clickListener = new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
...@@ -157,21 +183,6 @@ public class InAppWebChromeClient extends WebChromeClient { ...@@ -157,21 +183,6 @@ public class InAppWebChromeClient extends WebChromeClient {
AlertDialog alertDialog = alertDialogBuilder.create(); AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show(); alertDialog.show();
} }
}
@Override
public void error(String s, String s1, Object o) {
Log.e(LOG_TAG, s + ", " + s1);
}
@Override
public void notImplemented() {
}
});
return true;
}
@Override @Override
public boolean onJsConfirm(final WebView view, String url, final String message, public boolean onJsConfirm(final WebView view, String url, final String message,
...@@ -184,12 +195,17 @@ public class InAppWebChromeClient extends WebChromeClient { ...@@ -184,12 +195,17 @@ public class InAppWebChromeClient extends WebChromeClient {
getChannel().invokeMethod("onJsConfirm", obj, new MethodChannel.Result() { getChannel().invokeMethod("onJsConfirm", obj, new MethodChannel.Result() {
@Override @Override
public void success(Object response) { public void success(Object response) {
String responseMessage = null;
String confirmButtonTitle = null;
String cancelButtonTitle = null;
if (response != null) {
Map<String, Object> responseMap = (Map<String, Object>) response; Map<String, Object> responseMap = (Map<String, Object>) response;
String responseMessage = (String) responseMap.get("message"); responseMessage = (String) responseMap.get("message");
String confirmButtonTitle = (String) responseMap.get("confirmButtonTitle"); confirmButtonTitle = (String) responseMap.get("confirmButtonTitle");
String cancelButtonTitle = (String) responseMap.get("cancelButtonTitle"); cancelButtonTitle = (String) responseMap.get("cancelButtonTitle");
boolean handledByClient = (boolean) responseMap.get("handledByClient"); Boolean handledByClient = (Boolean) responseMap.get("handledByClient");
if (handledByClient) { if (handledByClient != null && handledByClient) {
Integer action = (Integer) responseMap.get("action"); Integer action = (Integer) responseMap.get("action");
action = action != null ? action : 1; action = action != null ? action : 1;
switch (action) { switch (action) {
...@@ -200,7 +216,29 @@ public class InAppWebChromeClient extends WebChromeClient { ...@@ -200,7 +216,29 @@ public class InAppWebChromeClient extends WebChromeClient {
default: default:
result.cancel(); result.cancel();
} }
} else { return;
}
}
createConfirmDialog(view, message, result, responseMessage, confirmButtonTitle, cancelButtonTitle);
}
@Override
public void error(String s, String s1, Object o) {
Log.e(LOG_TAG, s + ", " + s1);
result.cancel();
}
@Override
public void notImplemented() {
createConfirmDialog(view, message, result, null, null, null);
}
});
return true;
}
public void createConfirmDialog(WebView view, String message, final JsResult result, String responseMessage, String confirmButtonTitle, String cancelButtonTitle) {
String alertMessage = (responseMessage != null && !responseMessage.isEmpty()) ? responseMessage : message; String alertMessage = (responseMessage != null && !responseMessage.isEmpty()) ? responseMessage : message;
DialogInterface.OnClickListener confirmClickListener = new DialogInterface.OnClickListener() { DialogInterface.OnClickListener confirmClickListener = new DialogInterface.OnClickListener() {
@Override @Override
...@@ -241,21 +279,6 @@ public class InAppWebChromeClient extends WebChromeClient { ...@@ -241,21 +279,6 @@ public class InAppWebChromeClient extends WebChromeClient {
AlertDialog alertDialog = alertDialogBuilder.create(); AlertDialog alertDialog = alertDialogBuilder.create();
alertDialog.show(); alertDialog.show();
} }
}
@Override
public void error(String s, String s1, Object o) {
Log.e(LOG_TAG, s + ", " + s1);
}
@Override
public void notImplemented() {
}
});
return true;
}
@Override @Override
public boolean onJsPrompt(final WebView view, String url, final String message, public boolean onJsPrompt(final WebView view, String url, final String message,
...@@ -269,28 +292,54 @@ public class InAppWebChromeClient extends WebChromeClient { ...@@ -269,28 +292,54 @@ public class InAppWebChromeClient extends WebChromeClient {
getChannel().invokeMethod("onJsPrompt", obj, new MethodChannel.Result() { getChannel().invokeMethod("onJsPrompt", obj, new MethodChannel.Result() {
@Override @Override
public void success(Object response) { public void success(Object response) {
String responseMessage = null;
String responseDefaultValue = null;
String confirmButtonTitle = null;
String cancelButtonTitle = null;
String value = null;
if (response != null) {
Map<String, Object> responseMap = (Map<String, Object>) response; Map<String, Object> responseMap = (Map<String, Object>) response;
String responseMessage = (String) responseMap.get("message"); responseMessage = (String) responseMap.get("message");
String responseDefaultValue = (String) responseMap.get("defaultValue"); responseDefaultValue = (String) responseMap.get("defaultValue");
String confirmButtonTitle = (String) responseMap.get("confirmButtonTitle"); confirmButtonTitle = (String) responseMap.get("confirmButtonTitle");
String cancelButtonTitle = (String) responseMap.get("cancelButtonTitle"); cancelButtonTitle = (String) responseMap.get("cancelButtonTitle");
final String value = (String) responseMap.get("value"); value = (String) responseMap.get("value");
boolean handledByClient = (boolean) responseMap.get("handledByClient"); Boolean handledByClient = (Boolean) responseMap.get("handledByClient");
if (handledByClient) { if (handledByClient != null && handledByClient) {
Integer action = (Integer) responseMap.get("action"); Integer action = (Integer) responseMap.get("action");
action = action != null ? action : 1; action = action != null ? action : 1;
switch (action) { switch (action) {
case 0: case 0:
if (value != null)
result.confirm(value); result.confirm(value);
else
result.confirm();
break; break;
case 1: case 1:
default: default:
result.cancel(); result.cancel();
} }
} else { return;
}
}
createPromptDialog(view, message, defaultValue, result, responseMessage, responseDefaultValue, value, cancelButtonTitle, confirmButtonTitle);
}
@Override
public void error(String s, String s1, Object o) {
Log.e(LOG_TAG, s + ", " + s1);
result.cancel();
}
@Override
public void notImplemented() {
createPromptDialog(view, message, defaultValue, result, null, null, null, null, null);
}
});
return true;
}
public void createPromptDialog(WebView view, String message, String defaultValue, final JsPromptResult result, String responseMessage, String responseDefaultValue, String value, String cancelButtonTitle, String confirmButtonTitle) {
FrameLayout layout = new FrameLayout(view.getContext()); FrameLayout layout = new FrameLayout(view.getContext());
final EditText input = new EditText(view.getContext()); final EditText input = new EditText(view.getContext());
...@@ -305,11 +354,13 @@ public class InAppWebChromeClient extends WebChromeClient { ...@@ -305,11 +354,13 @@ public class InAppWebChromeClient extends WebChromeClient {
layout.addView(input); layout.addView(input);
String alertMessage = (responseMessage != null && !responseMessage.isEmpty()) ? responseMessage : message; String alertMessage = (responseMessage != null && !responseMessage.isEmpty()) ? responseMessage : message;
final String finalValue = value;
DialogInterface.OnClickListener confirmClickListener = new DialogInterface.OnClickListener() { DialogInterface.OnClickListener confirmClickListener = new DialogInterface.OnClickListener() {
@Override @Override
public void onClick(DialogInterface dialog, int which) { public void onClick(DialogInterface dialog, int which) {
String text = input.getText().toString(); String text = input.getText().toString();
result.confirm(value != null ? value : text); result.confirm(finalValue != null ? finalValue : text);
dialog.dismiss(); dialog.dismiss();
} }
}; };
...@@ -346,21 +397,6 @@ public class InAppWebChromeClient extends WebChromeClient { ...@@ -346,21 +397,6 @@ public class InAppWebChromeClient extends WebChromeClient {
alertDialog.setView(layout); alertDialog.setView(layout);
alertDialog.show(); alertDialog.show();
} }
}
@Override
public void error(String s, String s1, Object o) {
Log.e(LOG_TAG, s + ", " + s1);
}
@Override
public void notImplemented() {
}
});
return true;
}
@Override @Override
public boolean onCreateWindow(WebView view, boolean dialog, boolean userGesture, android.os.Message resultMsg) public boolean onCreateWindow(WebView view, boolean dialog, boolean userGesture, android.os.Message resultMsg)
......
...@@ -55,13 +55,14 @@ ...@@ -55,13 +55,14 @@
}); });
}); });
$(document).ready(function() { $(document).ready(function() {
/*
alert("Alert Popup"); alert("Alert Popup");
console.log(confirm("Press a button!")); console.log(confirm("Press a button!"));
console.log(prompt("Please enter your name", "Harry Potter")); console.log(prompt("Please enter your name", "Lorenzo"));
*/
console.log("jQuery ready"); console.log("jQuery ready");
/* /*
if ("geolocation" in navigator) { if ("geolocation" in navigator) {
console.log("Geolocation API enabled"); console.log("Geolocation API enabled");
navigator.geolocation.getCurrentPosition(function(position) { navigator.geolocation.getCurrentPosition(function(position) {
...@@ -69,7 +70,8 @@ ...@@ -69,7 +70,8 @@
}); });
} else { } else {
console.log("No geolocation API"); console.log("No geolocation API");
}*/ }
*/
}); });
</script> </script>
</body> </body>
......
...@@ -198,6 +198,54 @@ class _InlineExampleScreenState extends State<InlineExampleScreen> { ...@@ -198,6 +198,54 @@ class _InlineExampleScreenState extends State<InlineExampleScreen> {
return response; return response;
}, },
onJsAlert: (InAppWebViewController controller, String message) async { onJsAlert: (InAppWebViewController controller, String message) async {
JsAlertResponseAction action = await createAlertDialog(context, message);
return new JsAlertResponse(handledByClient: true, action: action);
},
onJsConfirm: (InAppWebViewController controller, String message) async {
JsConfirmResponseAction action = await createConfirmDialog(context, message);
return new JsConfirmResponse(handledByClient: true, action: action);
},
onJsPrompt: (InAppWebViewController controller, String message, String defaultValue) async {
_textFieldController.text = defaultValue;
JsPromptResponseAction action = await createPromptDialog(context, message);
return new JsPromptResponse(handledByClient: true, action: action, value: _textFieldController.text);
},
),
),
),
ButtonBar(
alignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
child: Icon(Icons.arrow_back),
onPressed: () {
if (webView != null) {
webView.goBack();
}
},
),
RaisedButton(
child: Icon(Icons.arrow_forward),
onPressed: () {
if (webView != null) {
webView.goForward();
}
},
),
RaisedButton(
child: Icon(Icons.refresh),
onPressed: () {
if (webView != null) {
webView.reload();
}
},
),
],
),
]));
}
Future<JsAlertResponseAction> createAlertDialog(BuildContext context, String message) async {
JsAlertResponseAction action; JsAlertResponseAction action;
await showDialog( await showDialog(
...@@ -218,9 +266,10 @@ class _InlineExampleScreenState extends State<InlineExampleScreen> { ...@@ -218,9 +266,10 @@ class _InlineExampleScreenState extends State<InlineExampleScreen> {
}, },
); );
return new JsAlertResponse(handledByClient: true, action: action); return action;
}, }
onJsConfirm: (InAppWebViewController controller, String message) async {
Future<JsConfirmResponseAction> createConfirmDialog(BuildContext context, String message) async {
JsConfirmResponseAction action; JsConfirmResponseAction action;
await showDialog( await showDialog(
...@@ -248,11 +297,11 @@ class _InlineExampleScreenState extends State<InlineExampleScreen> { ...@@ -248,11 +297,11 @@ class _InlineExampleScreenState extends State<InlineExampleScreen> {
}, },
); );
return new JsConfirmResponse(handledByClient: true, action: action); return action;
}, }
onJsPrompt: (InAppWebViewController controller, String message, String defaultValue) async {
Future<JsPromptResponseAction> createPromptDialog(BuildContext context, String message) async {
JsPromptResponseAction action; JsPromptResponseAction action;
_textFieldController.text = defaultValue;
await showDialog( await showDialog(
context: context, context: context,
...@@ -282,41 +331,7 @@ class _InlineExampleScreenState extends State<InlineExampleScreen> { ...@@ -282,41 +331,7 @@ class _InlineExampleScreenState extends State<InlineExampleScreen> {
}, },
); );
return new JsPromptResponse(handledByClient: true, action: action, value: _textFieldController.text); return action;
},
),
),
),
ButtonBar(
alignment: MainAxisAlignment.center,
children: <Widget>[
RaisedButton(
child: Icon(Icons.arrow_back),
onPressed: () {
if (webView != null) {
webView.goBack();
}
},
),
RaisedButton(
child: Icon(Icons.arrow_forward),
onPressed: () {
if (webView != null) {
webView.goForward();
}
},
),
RaisedButton(
child: Icon(Icons.refresh),
onPressed: () {
if (webView != null) {
webView.reload();
}
},
),
],
),
]));
} }
Future<String> _findLocalPath() async { Future<String> _findLocalPath() async {
......
...@@ -81,10 +81,27 @@ class MyInappBrowser extends InAppBrowser { ...@@ -81,10 +81,27 @@ class MyInappBrowser extends InAppBrowser {
Future<GeolocationPermissionShowPromptResponse> onGeolocationPermissionsShowPrompt(String origin) async { Future<GeolocationPermissionShowPromptResponse> onGeolocationPermissionsShowPrompt(String origin) async {
print("request Geolocation permission API"); print("request Geolocation permission API");
} }
@override
Future<JsAlertResponse> onJsAlert(String message) async {
return new JsAlertResponse(handledByClient: false, message: "coma iam");
}
@override
Future<JsConfirmResponse> onJsConfirm(String message) {
}
@override
Future<JsPromptResponse> onJsPrompt(String message, String defaultValue) {
}
} }
class WebviewExampleScreen extends StatefulWidget { class WebviewExampleScreen extends StatefulWidget {
final MyInappBrowser browser = new MyInappBrowser(); final MyInappBrowser browser = new MyInappBrowser();
static BuildContext context = null;
@override @override
_WebviewExampleScreenState createState() => new _WebviewExampleScreenState(); _WebviewExampleScreenState createState() => new _WebviewExampleScreenState();
} }
...@@ -97,11 +114,13 @@ class _WebviewExampleScreenState extends State<WebviewExampleScreen> { ...@@ -97,11 +114,13 @@ class _WebviewExampleScreenState extends State<WebviewExampleScreen> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
WebviewExampleScreen.context = context;
return new Center( return new Center(
child: new RaisedButton( child: new RaisedButton(
onPressed: () { onPressed: () {
widget.browser.open( widget.browser.openFile(
url: "https://www.google.com/", "assets/index.html",
//url: "https://www.google.com/",
options: [ options: [
InAppWebViewOptions( InAppWebViewOptions(
useShouldOverrideUrlLoading: true, useShouldOverrideUrlLoading: true,
......
...@@ -44,7 +44,6 @@ public class FlutterWebViewController: NSObject, FlutterPlatformView { ...@@ -44,7 +44,6 @@ public class FlutterWebViewController: NSObject, FlutterPlatformView {
do { do {
let jsonData = try JSONSerialization.data(withJSONObject: contentBlockers, options: []) let jsonData = try JSONSerialization.data(withJSONObject: contentBlockers, options: [])
let blockRules = String(data: jsonData, encoding: String.Encoding.utf8) let blockRules = String(data: jsonData, encoding: String.Encoding.utf8)
print(blockRules)
WKContentRuleListStore.default().compileContentRuleList( WKContentRuleListStore.default().compileContentRuleList(
forIdentifier: "ContentBlockingRules", forIdentifier: "ContentBlockingRules",
encodedContentRuleList: blockRules) { (contentRuleList, error) in encodedContentRuleList: blockRules) { (contentRuleList, error) in
......
This diff is collapsed.
...@@ -18,6 +18,7 @@ A new Flutter plugin. ...@@ -18,6 +18,7 @@ A new Flutter plugin.
s.dependency 'Flutter' s.dependency 'Flutter'
s.ios.deployment_target = '8.0' s.ios.deployment_target = '8.0'
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES', 'VALID_ARCHS[sdk=iphonesimulator*]' => 'x86_64' }
s.swift_version = '5.0' s.swift_version = '5.0'
end end
...@@ -358,6 +358,17 @@ class InAppBrowser { ...@@ -358,6 +358,17 @@ class InAppBrowser {
} }
///Event that notifies the host application that web content from the specified origin is attempting to use the Geolocation API, but no permission state is currently set for that origin.
///Note that for applications targeting Android N and later SDKs (API level > `Build.VERSION_CODES.M`) this method is only called for requests originating from secure origins such as https.
///On non-secure origins geolocation requests are automatically denied.
///
///[origin] represents the origin of the web content attempting to use the Geolocation API.
///
///**NOTE**: available only for Android.
Future<GeolocationPermissionShowPromptResponse> onGeolocationPermissionsShowPrompt (String origin) {
}
///Event fires when javascript calls the `alert()` method to display an alert dialog. ///Event fires when javascript calls the `alert()` method to display an alert dialog.
///If [JsAlertResponse.handledByClient] is `true`, the webview will assume that the client will handle the dialog. ///If [JsAlertResponse.handledByClient] is `true`, the webview will assume that the client will handle the dialog.
/// ///
...@@ -383,17 +394,6 @@ class InAppBrowser { ...@@ -383,17 +394,6 @@ class InAppBrowser {
} }
///Event that notifies the host application that web content from the specified origin is attempting to use the Geolocation API, but no permission state is currently set for that origin.
///Note that for applications targeting Android N and later SDKs (API level > `Build.VERSION_CODES.M`) this method is only called for requests originating from secure origins such as https.
///On non-secure origins geolocation requests are automatically denied.
///
///[origin] represents the origin of the web content attempting to use the Geolocation API.
///
///**NOTE**: available only for Android.
Future<GeolocationPermissionShowPromptResponse> onGeolocationPermissionsShowPrompt (String origin) {
}
void throwIsAlreadyOpened({String message = ''}) { void throwIsAlreadyOpened({String message = ''}) {
if (this.isOpened()) { if (this.isOpened()) {
throw Exception(['Error: ${ (message.isEmpty) ? '' : message + ' '}The browser is already opened.']); throw Exception(['Error: ${ (message.isEmpty) ? '' : message + ' '}The browser is already opened.']);
......
...@@ -428,31 +428,31 @@ class InAppWebViewController { ...@@ -428,31 +428,31 @@ class InAppWebViewController {
case "onGeolocationPermissionsShowPrompt": case "onGeolocationPermissionsShowPrompt":
String origin = call.arguments["origin"]; String origin = call.arguments["origin"];
if (_widget != null && _widget.onGeolocationPermissionsShowPrompt != null) if (_widget != null && _widget.onGeolocationPermissionsShowPrompt != null)
return (await _widget.onGeolocationPermissionsShowPrompt(this, origin)).toMap(); return (await _widget.onGeolocationPermissionsShowPrompt(this, origin))?.toMap();
else if (_inAppBrowser != null) else if (_inAppBrowser != null)
return (await _inAppBrowser.onGeolocationPermissionsShowPrompt(origin)).toMap(); return (await _inAppBrowser.onGeolocationPermissionsShowPrompt(origin))?.toMap();
break; break;
case "onJsAlert": case "onJsAlert":
String message = call.arguments["message"]; String message = call.arguments["message"];
if (_widget != null && _widget.onJsAlert != null) if (_widget != null && _widget.onJsAlert != null)
return (await _widget.onJsAlert(this, message)).toMap(); return (await _widget.onJsAlert(this, message))?.toMap();
else if (_inAppBrowser != null) else if (_inAppBrowser != null)
return (await _inAppBrowser.onJsAlert(message)).toMap(); return (await _inAppBrowser.onJsAlert(message))?.toMap();
break; break;
case "onJsConfirm": case "onJsConfirm":
String message = call.arguments["message"]; String message = call.arguments["message"];
if (_widget != null && _widget.onJsConfirm != null) if (_widget != null && _widget.onJsConfirm != null)
return (await _widget.onJsConfirm(this, message)).toMap(); return (await _widget.onJsConfirm(this, message))?.toMap();
else if (_inAppBrowser != null) else if (_inAppBrowser != null)
return (await _inAppBrowser.onJsConfirm(message)).toMap(); return (await _inAppBrowser.onJsConfirm(message))?.toMap();
break; break;
case "onJsPrompt": case "onJsPrompt":
String message = call.arguments["message"]; String message = call.arguments["message"];
String defaultValue = call.arguments["defaultValue"]; String defaultValue = call.arguments["defaultValue"];
if (_widget != null && _widget.onJsPrompt != null) if (_widget != null && _widget.onJsPrompt != null)
return (await _widget.onJsPrompt(this, message, defaultValue)).toMap(); return (await _widget.onJsPrompt(this, message, defaultValue))?.toMap();
else if (_inAppBrowser != null) else if (_inAppBrowser != null)
return (await _inAppBrowser.onJsPrompt(message, defaultValue)).toMap(); return (await _inAppBrowser.onJsPrompt(message, defaultValue))?.toMap();
break; break;
case "onCallJsHandler": case "onCallJsHandler":
String handlerName = call.arguments["handlerName"]; String handlerName = call.arguments["handlerName"];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment