flutter format
This commit is contained in:
parent
eea691664b
commit
0c71edf8a6
@ -201,20 +201,16 @@ class HeadlessInAppWebView implements WebView {
|
|||||||
CreateWindowRequest onCreateWindowRequest) onCreateWindow;
|
CreateWindowRequest onCreateWindowRequest) onCreateWindow;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller)
|
final void Function(InAppWebViewController controller) onCloseWindow;
|
||||||
onCloseWindow;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller)
|
final void Function(InAppWebViewController controller) onWindowFocus;
|
||||||
onWindowFocus;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller)
|
final void Function(InAppWebViewController controller) onWindowBlur;
|
||||||
onWindowBlur;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller)
|
final void Function(InAppWebViewController controller) androidOnRequestFocus;
|
||||||
androidOnRequestFocus;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller, String url)
|
final void Function(InAppWebViewController controller, String url)
|
||||||
@ -226,15 +222,18 @@ class HeadlessInAppWebView implements WebView {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<JsAlertResponse> Function(
|
final Future<JsAlertResponse> Function(
|
||||||
InAppWebViewController controller, JsAlertRequest jsAlertRequest) onJsAlert;
|
InAppWebViewController controller, JsAlertRequest jsAlertRequest)
|
||||||
|
onJsAlert;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<JsConfirmResponse> Function(
|
final Future<JsConfirmResponse> Function(
|
||||||
InAppWebViewController controller, JsConfirmRequest jsConfirmRequest) onJsConfirm;
|
InAppWebViewController controller, JsConfirmRequest jsConfirmRequest)
|
||||||
|
onJsConfirm;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<JsPromptResponse> Function(InAppWebViewController controller,
|
final Future<JsPromptResponse> Function(
|
||||||
JsPromptRequest jsPromptRequest) onJsPrompt;
|
InAppWebViewController controller, JsPromptRequest jsPromptRequest)
|
||||||
|
onJsPrompt;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller, String url, int code,
|
final void Function(InAppWebViewController controller, String url, int code,
|
||||||
@ -355,15 +354,17 @@ class HeadlessInAppWebView implements WebView {
|
|||||||
androidOnReceivedIcon;
|
androidOnReceivedIcon;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller, String url, bool precomposed)
|
final void Function(
|
||||||
|
InAppWebViewController controller, String url, bool precomposed)
|
||||||
androidOnReceivedTouchIconUrl;
|
androidOnReceivedTouchIconUrl;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<JsBeforeUnloadResponse> Function(
|
final Future<JsBeforeUnloadResponse> Function(
|
||||||
InAppWebViewController controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)
|
InAppWebViewController controller,
|
||||||
androidOnJsBeforeUnload;
|
JsBeforeUnloadRequest jsBeforeUnloadRequest) androidOnJsBeforeUnload;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller, LoginRequest loginRequest)
|
final void Function(
|
||||||
|
InAppWebViewController controller, LoginRequest loginRequest)
|
||||||
androidOnReceivedLoginRequest;
|
androidOnReceivedLoginRequest;
|
||||||
}
|
}
|
||||||
|
@ -567,7 +567,6 @@ class InAppBrowser {
|
|||||||
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTitle(android.webkit.WebView,%20java.lang.String)
|
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTitle(android.webkit.WebView,%20java.lang.String)
|
||||||
void onTitleChanged(String title) {}
|
void onTitleChanged(String title) {}
|
||||||
|
|
||||||
|
|
||||||
///Event fired when the WebView notifies that a loading URL has been flagged by Safe Browsing.
|
///Event fired when the WebView notifies that a loading URL has been flagged by Safe Browsing.
|
||||||
///The default behavior is to show an interstitial to the user, with the reporting checkbox visible.
|
///The default behavior is to show an interstitial to the user, with the reporting checkbox visible.
|
||||||
///
|
///
|
||||||
|
@ -165,27 +165,24 @@ class InAppWebView extends StatefulWidget implements WebView {
|
|||||||
CreateWindowRequest onCreateWindowRequest) onCreateWindow;
|
CreateWindowRequest onCreateWindowRequest) onCreateWindow;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller)
|
final void Function(InAppWebViewController controller) onCloseWindow;
|
||||||
onCloseWindow;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller)
|
final void Function(InAppWebViewController controller) onWindowFocus;
|
||||||
onWindowFocus;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller)
|
final void Function(InAppWebViewController controller) onWindowBlur;
|
||||||
onWindowBlur;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller)
|
final void Function(InAppWebViewController controller) androidOnRequestFocus;
|
||||||
androidOnRequestFocus;
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller, Uint8List icon)
|
final void Function(InAppWebViewController controller, Uint8List icon)
|
||||||
androidOnReceivedIcon;
|
androidOnReceivedIcon;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller, String url, bool precomposed)
|
final void Function(
|
||||||
|
InAppWebViewController controller, String url, bool precomposed)
|
||||||
androidOnReceivedTouchIconUrl;
|
androidOnReceivedTouchIconUrl;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@ -198,15 +195,18 @@ class InAppWebView extends StatefulWidget implements WebView {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<JsAlertResponse> Function(
|
final Future<JsAlertResponse> Function(
|
||||||
InAppWebViewController controller, JsAlertRequest jsAlertRequest) onJsAlert;
|
InAppWebViewController controller, JsAlertRequest jsAlertRequest)
|
||||||
|
onJsAlert;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<JsConfirmResponse> Function(
|
final Future<JsConfirmResponse> Function(
|
||||||
InAppWebViewController controller, JsConfirmRequest jsConfirmRequest) onJsConfirm;
|
InAppWebViewController controller, JsConfirmRequest jsConfirmRequest)
|
||||||
|
onJsConfirm;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<JsPromptResponse> Function(InAppWebViewController controller,
|
final Future<JsPromptResponse> Function(
|
||||||
JsPromptRequest jsPromptRequest) onJsPrompt;
|
InAppWebViewController controller, JsPromptRequest jsPromptRequest)
|
||||||
|
onJsPrompt;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller, String url, int code,
|
final void Function(InAppWebViewController controller, String url, int code,
|
||||||
@ -324,11 +324,12 @@ class InAppWebView extends StatefulWidget implements WebView {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
final Future<JsBeforeUnloadResponse> Function(
|
final Future<JsBeforeUnloadResponse> Function(
|
||||||
InAppWebViewController controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)
|
InAppWebViewController controller,
|
||||||
androidOnJsBeforeUnload;
|
JsBeforeUnloadRequest jsBeforeUnloadRequest) androidOnJsBeforeUnload;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
final void Function(InAppWebViewController controller, LoginRequest loginRequest)
|
final void Function(
|
||||||
|
InAppWebViewController controller, LoginRequest loginRequest)
|
||||||
androidOnReceivedLoginRequest;
|
androidOnReceivedLoginRequest;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,19 +228,21 @@ class InAppWebViewController {
|
|||||||
if (_webview != null && _webview.onCreateWindow != null)
|
if (_webview != null && _webview.onCreateWindow != null)
|
||||||
webView = await _webview.onCreateWindow(this, createWindowRequest);
|
webView = await _webview.onCreateWindow(this, createWindowRequest);
|
||||||
else if (_inAppBrowser != null) {
|
else if (_inAppBrowser != null) {
|
||||||
inAppBrowserWindow = await _inAppBrowser.onCreateWindow(createWindowRequest);
|
inAppBrowserWindow =
|
||||||
|
await _inAppBrowser.onCreateWindow(createWindowRequest);
|
||||||
assert(
|
assert(
|
||||||
inAppBrowserWindow is InAppBrowser || inAppBrowserWindow is HeadlessInAppWebView,
|
inAppBrowserWindow is InAppBrowser ||
|
||||||
"InAppBrowser.onCreateWindow should return an \"InAppBrowser\" instance or a \"HeadlessInAppWebView\" instance."
|
inAppBrowserWindow is HeadlessInAppWebView,
|
||||||
);
|
"InAppBrowser.onCreateWindow should return an \"InAppBrowser\" instance or a \"HeadlessInAppWebView\" instance.");
|
||||||
}
|
}
|
||||||
|
|
||||||
int webViewWindowId;
|
int webViewWindowId;
|
||||||
|
|
||||||
if (webView != null) {
|
if (webView != null) {
|
||||||
webViewWindowId = webView.windowId;
|
webViewWindowId = webView.windowId;
|
||||||
assert(webViewWindowId !=
|
assert(
|
||||||
null, "If you are returning a WebView, then WebView.windowId should be not null. To set the " +
|
webViewWindowId != null,
|
||||||
|
"If you are returning a WebView, then WebView.windowId should be not null. To set the " +
|
||||||
"WebView.windowId property, you should use the CreateWindowRequest.windowId property.");
|
"WebView.windowId property, you should use the CreateWindowRequest.windowId property.");
|
||||||
if (webView is HeadlessInAppWebView) {
|
if (webView is HeadlessInAppWebView) {
|
||||||
webView.run();
|
webView.run();
|
||||||
@ -248,15 +250,16 @@ class InAppWebViewController {
|
|||||||
} else if (inAppBrowserWindow != null) {
|
} else if (inAppBrowserWindow != null) {
|
||||||
if (inAppBrowserWindow is InAppBrowser) {
|
if (inAppBrowserWindow is InAppBrowser) {
|
||||||
webViewWindowId = inAppBrowserWindow.windowId;
|
webViewWindowId = inAppBrowserWindow.windowId;
|
||||||
assert(webViewWindowId !=
|
assert(
|
||||||
null, "If you are returning an InAppBrowser, then InAppBrowser.windowId should be not null. To set the " +
|
webViewWindowId != null,
|
||||||
|
"If you are returning an InAppBrowser, then InAppBrowser.windowId should be not null. To set the " +
|
||||||
"InAppBrowser.windowId property, you should use the CreateWindowRequest.windowId property.");
|
"InAppBrowser.windowId property, you should use the CreateWindowRequest.windowId property.");
|
||||||
inAppBrowserWindow.openUrl(url: "about:blank");
|
inAppBrowserWindow.openUrl(url: "about:blank");
|
||||||
}
|
} else if (inAppBrowserWindow is HeadlessInAppWebView) {
|
||||||
else if (inAppBrowserWindow is HeadlessInAppWebView) {
|
|
||||||
webViewWindowId = inAppBrowserWindow.windowId;
|
webViewWindowId = inAppBrowserWindow.windowId;
|
||||||
assert(webViewWindowId !=
|
assert(
|
||||||
null, "If you are returning a HeadlessInAppWebView, then HeadlessInAppWebView.windowId should be not null. To set the " +
|
webViewWindowId != null,
|
||||||
|
"If you are returning a HeadlessInAppWebView, then HeadlessInAppWebView.windowId should be not null. To set the " +
|
||||||
"HeadlessInAppWebView.windowId property, you should use the CreateWindowRequest.windowId property.");
|
"HeadlessInAppWebView.windowId property, you should use the CreateWindowRequest.windowId property.");
|
||||||
inAppBrowserWindow.run();
|
inAppBrowserWindow.run();
|
||||||
}
|
}
|
||||||
@ -266,15 +269,13 @@ class InAppWebViewController {
|
|||||||
case "onCloseWindow":
|
case "onCloseWindow":
|
||||||
if (_webview != null && _webview.onCloseWindow != null)
|
if (_webview != null && _webview.onCloseWindow != null)
|
||||||
_webview.onCloseWindow(this);
|
_webview.onCloseWindow(this);
|
||||||
else if (_inAppBrowser != null)
|
else if (_inAppBrowser != null) _inAppBrowser.onCloseWindow();
|
||||||
_inAppBrowser.onCloseWindow();
|
|
||||||
break;
|
break;
|
||||||
case "onTitleChanged":
|
case "onTitleChanged":
|
||||||
String title = call.arguments["title"];
|
String title = call.arguments["title"];
|
||||||
if (_webview != null && _webview.onTitleChanged != null)
|
if (_webview != null && _webview.onTitleChanged != null)
|
||||||
_webview.onTitleChanged(this, title);
|
_webview.onTitleChanged(this, title);
|
||||||
else if (_inAppBrowser != null)
|
else if (_inAppBrowser != null) _inAppBrowser.onTitleChanged(title);
|
||||||
_inAppBrowser.onTitleChanged(title);
|
|
||||||
break;
|
break;
|
||||||
case "onGeolocationPermissionsShowPrompt":
|
case "onGeolocationPermissionsShowPrompt":
|
||||||
String origin = call.arguments["origin"];
|
String origin = call.arguments["origin"];
|
||||||
@ -369,8 +370,7 @@ class InAppWebViewController {
|
|||||||
case "onRequestFocus":
|
case "onRequestFocus":
|
||||||
if (_webview != null && _webview.androidOnRequestFocus != null)
|
if (_webview != null && _webview.androidOnRequestFocus != null)
|
||||||
_webview.androidOnRequestFocus(this);
|
_webview.androidOnRequestFocus(this);
|
||||||
else if (_inAppBrowser != null)
|
else if (_inAppBrowser != null) _inAppBrowser.androidOnRequestFocus();
|
||||||
_inAppBrowser.androidOnRequestFocus();
|
|
||||||
break;
|
break;
|
||||||
case "onReceivedIcon":
|
case "onReceivedIcon":
|
||||||
Uint8List icon = Uint8List.fromList(call.arguments["icon"].cast<int>());
|
Uint8List icon = Uint8List.fromList(call.arguments["icon"].cast<int>());
|
||||||
@ -394,10 +394,7 @@ class InAppWebViewController {
|
|||||||
bool iosIsMainFrame = call.arguments["iosIsMainFrame"];
|
bool iosIsMainFrame = call.arguments["iosIsMainFrame"];
|
||||||
|
|
||||||
JsAlertRequest jsAlertRequest = JsAlertRequest(
|
JsAlertRequest jsAlertRequest = JsAlertRequest(
|
||||||
url: url,
|
url: url, message: message, iosIsMainFrame: iosIsMainFrame);
|
||||||
message: message,
|
|
||||||
iosIsMainFrame: iosIsMainFrame
|
|
||||||
);
|
|
||||||
|
|
||||||
if (_webview != null && _webview.onJsAlert != null)
|
if (_webview != null && _webview.onJsAlert != null)
|
||||||
return (await _webview.onJsAlert(this, jsAlertRequest))?.toMap();
|
return (await _webview.onJsAlert(this, jsAlertRequest))?.toMap();
|
||||||
@ -410,10 +407,7 @@ class InAppWebViewController {
|
|||||||
bool iosIsMainFrame = call.arguments["iosIsMainFrame"];
|
bool iosIsMainFrame = call.arguments["iosIsMainFrame"];
|
||||||
|
|
||||||
JsConfirmRequest jsConfirmRequest = JsConfirmRequest(
|
JsConfirmRequest jsConfirmRequest = JsConfirmRequest(
|
||||||
url: url,
|
url: url, message: message, iosIsMainFrame: iosIsMainFrame);
|
||||||
message: message,
|
|
||||||
iosIsMainFrame: iosIsMainFrame
|
|
||||||
);
|
|
||||||
|
|
||||||
if (_webview != null && _webview.onJsConfirm != null)
|
if (_webview != null && _webview.onJsConfirm != null)
|
||||||
return (await _webview.onJsConfirm(this, jsConfirmRequest))?.toMap();
|
return (await _webview.onJsConfirm(this, jsConfirmRequest))?.toMap();
|
||||||
@ -430,15 +424,12 @@ class InAppWebViewController {
|
|||||||
url: url,
|
url: url,
|
||||||
message: message,
|
message: message,
|
||||||
defaultValue: defaultValue,
|
defaultValue: defaultValue,
|
||||||
iosIsMainFrame: iosIsMainFrame
|
iosIsMainFrame: iosIsMainFrame);
|
||||||
);
|
|
||||||
|
|
||||||
if (_webview != null && _webview.onJsPrompt != null)
|
if (_webview != null && _webview.onJsPrompt != null)
|
||||||
return (await _webview.onJsPrompt(this, jsPromptRequest))
|
return (await _webview.onJsPrompt(this, jsPromptRequest))?.toMap();
|
||||||
?.toMap();
|
|
||||||
else if (_inAppBrowser != null)
|
else if (_inAppBrowser != null)
|
||||||
return (await _inAppBrowser.onJsPrompt(jsPromptRequest))
|
return (await _inAppBrowser.onJsPrompt(jsPromptRequest))?.toMap();
|
||||||
?.toMap();
|
|
||||||
break;
|
break;
|
||||||
case "onJsBeforeUnload":
|
case "onJsBeforeUnload":
|
||||||
String url = call.arguments["url"];
|
String url = call.arguments["url"];
|
||||||
@ -446,17 +437,18 @@ class InAppWebViewController {
|
|||||||
bool iosIsMainFrame = call.arguments["iosIsMainFrame"];
|
bool iosIsMainFrame = call.arguments["iosIsMainFrame"];
|
||||||
|
|
||||||
JsBeforeUnloadRequest jsBeforeUnloadRequest = JsBeforeUnloadRequest(
|
JsBeforeUnloadRequest jsBeforeUnloadRequest = JsBeforeUnloadRequest(
|
||||||
url: url,
|
url: url, message: message, iosIsMainFrame: iosIsMainFrame);
|
||||||
message: message,
|
|
||||||
iosIsMainFrame: iosIsMainFrame
|
|
||||||
);
|
|
||||||
|
|
||||||
print(jsBeforeUnloadRequest);
|
print(jsBeforeUnloadRequest);
|
||||||
|
|
||||||
if (_webview != null && _webview.androidOnJsBeforeUnload != null)
|
if (_webview != null && _webview.androidOnJsBeforeUnload != null)
|
||||||
return (await _webview.androidOnJsBeforeUnload(this, jsBeforeUnloadRequest))?.toMap();
|
return (await _webview.androidOnJsBeforeUnload(
|
||||||
|
this, jsBeforeUnloadRequest))
|
||||||
|
?.toMap();
|
||||||
else if (_inAppBrowser != null)
|
else if (_inAppBrowser != null)
|
||||||
return (await _inAppBrowser.androidOnJsBeforeUnload(jsBeforeUnloadRequest))?.toMap();
|
return (await _inAppBrowser
|
||||||
|
.androidOnJsBeforeUnload(jsBeforeUnloadRequest))
|
||||||
|
?.toMap();
|
||||||
break;
|
break;
|
||||||
case "onSafeBrowsingHit":
|
case "onSafeBrowsingHit":
|
||||||
String url = call.arguments["url"];
|
String url = call.arguments["url"];
|
||||||
@ -475,11 +467,8 @@ class InAppWebViewController {
|
|||||||
String account = call.arguments["account"];
|
String account = call.arguments["account"];
|
||||||
String args = call.arguments["args"];
|
String args = call.arguments["args"];
|
||||||
|
|
||||||
LoginRequest loginRequest = LoginRequest(
|
LoginRequest loginRequest =
|
||||||
realm: realm,
|
LoginRequest(realm: realm, account: account, args: args);
|
||||||
account: account,
|
|
||||||
args: args
|
|
||||||
);
|
|
||||||
|
|
||||||
if (_webview != null && _webview.androidOnReceivedLoginRequest != null)
|
if (_webview != null && _webview.androidOnReceivedLoginRequest != null)
|
||||||
_webview.androidOnReceivedLoginRequest(this, loginRequest);
|
_webview.androidOnReceivedLoginRequest(this, loginRequest);
|
||||||
@ -942,14 +931,12 @@ class InAppWebViewController {
|
|||||||
case "onWindowFocus":
|
case "onWindowFocus":
|
||||||
if (_webview != null && _webview.onWindowFocus != null)
|
if (_webview != null && _webview.onWindowFocus != null)
|
||||||
_webview.onWindowFocus(this);
|
_webview.onWindowFocus(this);
|
||||||
else if (_inAppBrowser != null)
|
else if (_inAppBrowser != null) _inAppBrowser.onWindowFocus();
|
||||||
_inAppBrowser.onWindowFocus();
|
|
||||||
return null;
|
return null;
|
||||||
case "onWindowBlur":
|
case "onWindowBlur":
|
||||||
if (_webview != null && _webview.onWindowBlur != null)
|
if (_webview != null && _webview.onWindowBlur != null)
|
||||||
_webview.onWindowBlur(this);
|
_webview.onWindowBlur(this);
|
||||||
else if (_inAppBrowser != null)
|
else if (_inAppBrowser != null) _inAppBrowser.onWindowBlur();
|
||||||
_inAppBrowser.onWindowBlur();
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -450,11 +450,7 @@ class JsAlertRequest {
|
|||||||
///Indicates whether the request was made for the main frame. Available only on iOS.
|
///Indicates whether the request was made for the main frame. Available only on iOS.
|
||||||
bool iosIsMainFrame;
|
bool iosIsMainFrame;
|
||||||
|
|
||||||
JsAlertRequest({
|
JsAlertRequest({this.url, this.message, this.iosIsMainFrame});
|
||||||
this.url,
|
|
||||||
this.message,
|
|
||||||
this.iosIsMainFrame
|
|
||||||
});
|
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
return {"url": url, "message": message, "iosIsMainFrame": iosIsMainFrame};
|
return {"url": url, "message": message, "iosIsMainFrame": iosIsMainFrame};
|
||||||
@ -536,11 +532,7 @@ class JsConfirmRequest {
|
|||||||
///Indicates whether the request was made for the main frame. Available only on iOS.
|
///Indicates whether the request was made for the main frame. Available only on iOS.
|
||||||
bool iosIsMainFrame;
|
bool iosIsMainFrame;
|
||||||
|
|
||||||
JsConfirmRequest({
|
JsConfirmRequest({this.url, this.message, this.iosIsMainFrame});
|
||||||
this.url,
|
|
||||||
this.message,
|
|
||||||
this.iosIsMainFrame
|
|
||||||
});
|
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
return {"url": url, "message": message, "iosIsMainFrame": iosIsMainFrame};
|
return {"url": url, "message": message, "iosIsMainFrame": iosIsMainFrame};
|
||||||
@ -631,15 +623,16 @@ class JsPromptRequest {
|
|||||||
///Indicates whether the request was made for the main frame. Available only on iOS.
|
///Indicates whether the request was made for the main frame. Available only on iOS.
|
||||||
bool iosIsMainFrame;
|
bool iosIsMainFrame;
|
||||||
|
|
||||||
JsPromptRequest({
|
JsPromptRequest(
|
||||||
this.url,
|
{this.url, this.message, this.defaultValue, this.iosIsMainFrame});
|
||||||
this.message,
|
|
||||||
this.defaultValue,
|
|
||||||
this.iosIsMainFrame
|
|
||||||
});
|
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
return {"url": url, "message": message, "defaultValue": defaultValue, "iosIsMainFrame": iosIsMainFrame};
|
return {
|
||||||
|
"url": url,
|
||||||
|
"message": message,
|
||||||
|
"defaultValue": defaultValue,
|
||||||
|
"iosIsMainFrame": iosIsMainFrame
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
@ -734,11 +727,7 @@ class JsBeforeUnloadRequest {
|
|||||||
///Indicates whether the request was made for the main frame. Available only on iOS.
|
///Indicates whether the request was made for the main frame. Available only on iOS.
|
||||||
bool iosIsMainFrame;
|
bool iosIsMainFrame;
|
||||||
|
|
||||||
JsBeforeUnloadRequest({
|
JsBeforeUnloadRequest({this.url, this.message, this.iosIsMainFrame});
|
||||||
this.url,
|
|
||||||
this.message,
|
|
||||||
this.iosIsMainFrame
|
|
||||||
});
|
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
return {"url": url, "message": message, "iosIsMainFrame": iosIsMainFrame};
|
return {"url": url, "message": message, "iosIsMainFrame": iosIsMainFrame};
|
||||||
@ -4376,18 +4365,10 @@ class LoginRequest {
|
|||||||
///Authenticator specific arguments used to log in the user.
|
///Authenticator specific arguments used to log in the user.
|
||||||
String args;
|
String args;
|
||||||
|
|
||||||
LoginRequest({
|
LoginRequest({this.realm, this.account, this.args});
|
||||||
this.realm,
|
|
||||||
this.account,
|
|
||||||
this.args
|
|
||||||
});
|
|
||||||
|
|
||||||
Map<String, dynamic> toMap() {
|
Map<String, dynamic> toMap() {
|
||||||
return {
|
return {"realm": realm, "account": account, "args": args};
|
||||||
"realm": realm,
|
|
||||||
"account": account,
|
|
||||||
"args": args
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, dynamic> toJson() {
|
Map<String, dynamic> toJson() {
|
||||||
|
@ -187,7 +187,8 @@ abstract class WebView {
|
|||||||
///
|
///
|
||||||
///**Official iOS API**: https://developer.apple.com/documentation/webkit/wkuidelegate/1537406-webview
|
///**Official iOS API**: https://developer.apple.com/documentation/webkit/wkuidelegate/1537406-webview
|
||||||
final Future<JsAlertResponse> Function(
|
final Future<JsAlertResponse> Function(
|
||||||
InAppWebViewController controller, JsAlertRequest jsAlertRequest) onJsAlert;
|
InAppWebViewController controller, JsAlertRequest jsAlertRequest)
|
||||||
|
onJsAlert;
|
||||||
|
|
||||||
///Event fired when javascript calls the `confirm()` method to display a confirm dialog.
|
///Event fired when javascript calls the `confirm()` method to display a confirm dialog.
|
||||||
///If [JsConfirmResponse.handledByClient] is `true`, the webview will assume that the client will handle the dialog.
|
///If [JsConfirmResponse.handledByClient] is `true`, the webview will assume that the client will handle the dialog.
|
||||||
@ -198,7 +199,8 @@ abstract class WebView {
|
|||||||
///
|
///
|
||||||
///**Official iOS API**: https://developer.apple.com/documentation/webkit/wkuidelegate/1536489-webview
|
///**Official iOS API**: https://developer.apple.com/documentation/webkit/wkuidelegate/1536489-webview
|
||||||
final Future<JsConfirmResponse> Function(
|
final Future<JsConfirmResponse> Function(
|
||||||
InAppWebViewController controller, JsConfirmRequest jsConfirmRequest) onJsConfirm;
|
InAppWebViewController controller, JsConfirmRequest jsConfirmRequest)
|
||||||
|
onJsConfirm;
|
||||||
|
|
||||||
///Event fired when javascript calls the `prompt()` method to display a prompt dialog.
|
///Event fired when javascript calls the `prompt()` method to display a prompt dialog.
|
||||||
///If [JsPromptResponse.handledByClient] is `true`, the webview will assume that the client will handle the dialog.
|
///If [JsPromptResponse.handledByClient] is `true`, the webview will assume that the client will handle the dialog.
|
||||||
@ -208,8 +210,9 @@ abstract class WebView {
|
|||||||
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onJsPrompt(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20android.webkit.JsPromptResult)
|
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onJsPrompt(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String,%20android.webkit.JsPromptResult)
|
||||||
///
|
///
|
||||||
///**Official iOS API**: https://developer.apple.com/documentation/webkit/wkuidelegate/1538086-webview
|
///**Official iOS API**: https://developer.apple.com/documentation/webkit/wkuidelegate/1538086-webview
|
||||||
final Future<JsPromptResponse> Function(InAppWebViewController controller,
|
final Future<JsPromptResponse> Function(
|
||||||
JsPromptRequest jsPromptRequest) onJsPrompt;
|
InAppWebViewController controller, JsPromptRequest jsPromptRequest)
|
||||||
|
onJsPrompt;
|
||||||
|
|
||||||
///Event fired when the WebView received an HTTP authentication request. The default behavior is to cancel the request.
|
///Event fired when the WebView received an HTTP authentication request. The default behavior is to cancel the request.
|
||||||
///
|
///
|
||||||
@ -539,7 +542,8 @@ abstract class WebView {
|
|||||||
///**NOTE**: available only on Android.
|
///**NOTE**: available only on Android.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedIcon(android.webkit.WebView,%20android.graphics.Bitmap)
|
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedIcon(android.webkit.WebView,%20android.graphics.Bitmap)
|
||||||
final void Function(InAppWebViewController controller, Uint8List icon) androidOnReceivedIcon;
|
final void Function(InAppWebViewController controller, Uint8List icon)
|
||||||
|
androidOnReceivedIcon;
|
||||||
|
|
||||||
///Event fired when there is an url for an apple-touch-icon.
|
///Event fired when there is an url for an apple-touch-icon.
|
||||||
///
|
///
|
||||||
@ -550,7 +554,9 @@ abstract class WebView {
|
|||||||
///**NOTE**: available only on Android.
|
///**NOTE**: available only on Android.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTouchIconUrl(android.webkit.WebView,%20java.lang.String,%20boolean)
|
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onReceivedTouchIconUrl(android.webkit.WebView,%20java.lang.String,%20boolean)
|
||||||
final void Function(InAppWebViewController controller, String url, bool precomposed) androidOnReceivedTouchIconUrl;
|
final void Function(
|
||||||
|
InAppWebViewController controller, String url, bool precomposed)
|
||||||
|
androidOnReceivedTouchIconUrl;
|
||||||
|
|
||||||
///Event fired when the client should display a dialog to confirm navigation away from the current page.
|
///Event fired when the client should display a dialog to confirm navigation away from the current page.
|
||||||
///This is the result of the `onbeforeunload` javascript event.
|
///This is the result of the `onbeforeunload` javascript event.
|
||||||
@ -566,7 +572,8 @@ abstract class WebView {
|
|||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onJsBeforeUnload(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)
|
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebChromeClient#onJsBeforeUnload(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20android.webkit.JsResult)
|
||||||
final Future<JsBeforeUnloadResponse> Function(
|
final Future<JsBeforeUnloadResponse> Function(
|
||||||
InAppWebViewController controller, JsBeforeUnloadRequest jsBeforeUnloadRequest) androidOnJsBeforeUnload;
|
InAppWebViewController controller,
|
||||||
|
JsBeforeUnloadRequest jsBeforeUnloadRequest) androidOnJsBeforeUnload;
|
||||||
|
|
||||||
///Event fired when a request to automatically log in the user has been processed.
|
///Event fired when a request to automatically log in the user has been processed.
|
||||||
///
|
///
|
||||||
@ -575,7 +582,9 @@ abstract class WebView {
|
|||||||
///**NOTE**: available only on Android.
|
///**NOTE**: available only on Android.
|
||||||
///
|
///
|
||||||
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedLoginRequest(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String)
|
///**Official Android API**: https://developer.android.com/reference/android/webkit/WebViewClient#onReceivedLoginRequest(android.webkit.WebView,%20java.lang.String,%20java.lang.String,%20java.lang.String)
|
||||||
final void Function(InAppWebViewController controller, LoginRequest loginRequest) androidOnReceivedLoginRequest;
|
final void Function(
|
||||||
|
InAppWebViewController controller, LoginRequest loginRequest)
|
||||||
|
androidOnReceivedLoginRequest;
|
||||||
|
|
||||||
///Invoked when the web view's web content process is terminated.
|
///Invoked when the web view's web content process is terminated.
|
||||||
///
|
///
|
||||||
|
Loading…
x
Reference in New Issue
Block a user