Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
import 'dart:typed_data';
|
|
|
|
|
2020-05-11 00:48:41 +00:00
|
|
|
import 'package:flutter/services.dart';
|
|
|
|
|
2020-05-21 01:34:39 +00:00
|
|
|
import 'context_menu.dart';
|
2020-05-11 00:48:41 +00:00
|
|
|
import 'types.dart';
|
|
|
|
import 'webview.dart';
|
|
|
|
import 'in_app_webview_controller.dart';
|
|
|
|
|
|
|
|
///Class that represents a WebView in headless mode.
|
|
|
|
///It can be used to run a WebView in background without attaching an `InAppWebView` to the widget tree.
|
|
|
|
///
|
|
|
|
///Remember to dispose it when you don't need it anymore.
|
|
|
|
class HeadlessInAppWebView implements WebView {
|
|
|
|
String uuid;
|
|
|
|
bool _isDisposed = true;
|
2020-05-29 17:56:03 +00:00
|
|
|
static const MethodChannel _sharedChannel =
|
|
|
|
const MethodChannel('com.pichillilorenzo/flutter_headless_inappwebview');
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
///WebView Controller that can be used to access the [InAppWebViewController] API.
|
|
|
|
InAppWebViewController webViewController;
|
|
|
|
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
///The window id of a [CreateWindowRequest.windowId].
|
|
|
|
final int windowId;
|
|
|
|
|
2020-05-29 17:56:03 +00:00
|
|
|
HeadlessInAppWebView(
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
{this.windowId,
|
|
|
|
this.onWebViewCreated,
|
2020-05-29 17:56:03 +00:00
|
|
|
this.onLoadStart,
|
|
|
|
this.onLoadStop,
|
|
|
|
this.onLoadError,
|
|
|
|
this.onLoadHttpError,
|
|
|
|
this.onProgressChanged,
|
|
|
|
this.onConsoleMessage,
|
|
|
|
this.shouldOverrideUrlLoading,
|
|
|
|
this.onLoadResource,
|
|
|
|
this.onScrollChanged,
|
|
|
|
this.onDownloadStart,
|
|
|
|
this.onLoadResourceCustomScheme,
|
|
|
|
this.onCreateWindow,
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
this.onCloseWindow,
|
2020-05-29 17:56:03 +00:00
|
|
|
this.onJsAlert,
|
|
|
|
this.onJsConfirm,
|
|
|
|
this.onJsPrompt,
|
|
|
|
this.onReceivedHttpAuthRequest,
|
|
|
|
this.onReceivedServerTrustAuthRequest,
|
|
|
|
this.onReceivedClientCertRequest,
|
|
|
|
this.onFindResultReceived,
|
|
|
|
this.shouldInterceptAjaxRequest,
|
|
|
|
this.onAjaxReadyStateChange,
|
|
|
|
this.onAjaxProgress,
|
|
|
|
this.shouldInterceptFetchRequest,
|
|
|
|
this.onUpdateVisitedHistory,
|
|
|
|
this.onPrint,
|
|
|
|
this.onLongPressHitTestResult,
|
|
|
|
this.onEnterFullscreen,
|
|
|
|
this.onExitFullscreen,
|
|
|
|
this.onPageCommitVisible,
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
this.onTitleChanged,
|
|
|
|
this.onWindowFocus,
|
|
|
|
this.onWindowBlur,
|
2020-05-29 17:56:03 +00:00
|
|
|
this.androidOnSafeBrowsingHit,
|
|
|
|
this.androidOnPermissionRequest,
|
|
|
|
this.androidOnGeolocationPermissionsShowPrompt,
|
|
|
|
this.androidOnGeolocationPermissionsHidePrompt,
|
|
|
|
this.androidShouldInterceptRequest,
|
|
|
|
this.androidOnRenderProcessGone,
|
|
|
|
this.androidOnRenderProcessResponsive,
|
|
|
|
this.androidOnRenderProcessUnresponsive,
|
|
|
|
this.androidOnFormResubmission,
|
|
|
|
this.androidOnScaleChanged,
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
this.androidOnRequestFocus,
|
|
|
|
this.androidOnReceivedIcon,
|
|
|
|
this.androidOnReceivedTouchIconUrl,
|
|
|
|
this.androidOnJsBeforeUnload,
|
|
|
|
this.androidOnReceivedLoginRequest,
|
2020-05-29 17:56:03 +00:00
|
|
|
this.iosOnWebContentProcessDidTerminate,
|
|
|
|
this.iosOnDidReceiveServerRedirectForProvisionalNavigation,
|
|
|
|
this.initialUrl,
|
|
|
|
this.initialFile,
|
|
|
|
this.initialData,
|
|
|
|
this.initialHeaders,
|
|
|
|
this.initialOptions,
|
|
|
|
this.contextMenu}) {
|
2020-05-11 00:48:41 +00:00
|
|
|
uuid = uuidGenerator.v4();
|
|
|
|
webViewController = new InAppWebViewController(uuid, this);
|
|
|
|
}
|
|
|
|
|
|
|
|
Future<dynamic> handleMethod(MethodCall call) async {
|
|
|
|
switch (call.method) {
|
|
|
|
case "onHeadlessWebViewCreated":
|
|
|
|
onWebViewCreated(webViewController);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
return webViewController.handleMethod(call);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
///Runs the headless WebView.
|
|
|
|
Future<void> run() async {
|
|
|
|
if (!_isDisposed) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
_isDisposed = false;
|
|
|
|
Map<String, dynamic> args = <String, dynamic>{};
|
|
|
|
args.putIfAbsent('uuid', () => uuid);
|
2020-05-29 17:56:03 +00:00
|
|
|
args.putIfAbsent(
|
|
|
|
'params',
|
|
|
|
() => <String, dynamic>{
|
|
|
|
'initialUrl': '${Uri.parse(this.initialUrl)}',
|
|
|
|
'initialFile': this.initialFile,
|
|
|
|
'initialData': this.initialData?.toMap(),
|
|
|
|
'initialHeaders': this.initialHeaders,
|
|
|
|
'initialOptions': this.initialOptions?.toMap() ?? {},
|
|
|
|
'contextMenu': this.contextMenu?.toMap() ?? {}
|
|
|
|
});
|
2020-05-11 00:48:41 +00:00
|
|
|
await _sharedChannel.invokeMethod('createHeadlessWebView', args);
|
|
|
|
}
|
|
|
|
|
|
|
|
///Disposes the headless WebView.
|
|
|
|
Future<void> dispose() async {
|
|
|
|
if (_isDisposed) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Map<String, dynamic> args = <String, dynamic>{};
|
|
|
|
args.putIfAbsent('uuid', () => uuid);
|
|
|
|
await _sharedChannel.invokeMethod('disposeHeadlessWebView', args);
|
|
|
|
_isDisposed = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
final void Function(InAppWebViewController controller)
|
2020-05-29 17:56:03 +00:00
|
|
|
androidOnGeolocationPermissionsHidePrompt;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<GeolocationPermissionShowPromptResponse> Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, String origin)
|
|
|
|
androidOnGeolocationPermissionsShowPrompt;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<PermissionRequestResponse> Function(
|
|
|
|
InAppWebViewController controller,
|
|
|
|
String origin,
|
|
|
|
List<String> resources) androidOnPermissionRequest;
|
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<SafeBrowsingResponse> Function(InAppWebViewController controller,
|
|
|
|
String url, SafeBrowsingThreat threatType) androidOnSafeBrowsingHit;
|
|
|
|
|
|
|
|
@override
|
|
|
|
final InAppWebViewInitialData initialData;
|
|
|
|
|
|
|
|
@override
|
|
|
|
final String initialFile;
|
|
|
|
|
|
|
|
@override
|
|
|
|
final Map<String, String> initialHeaders;
|
|
|
|
|
|
|
|
@override
|
|
|
|
final InAppWebViewGroupOptions initialOptions;
|
|
|
|
|
2020-05-21 01:34:39 +00:00
|
|
|
@override
|
|
|
|
final ContextMenu contextMenu;
|
|
|
|
|
2020-05-11 00:48:41 +00:00
|
|
|
@override
|
|
|
|
final String initialUrl;
|
|
|
|
|
|
|
|
@override
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
final void Function(InAppWebViewController controller, String url)
|
2020-05-29 17:56:03 +00:00
|
|
|
onPageCommitVisible;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
final void Function(InAppWebViewController controller, String title)
|
2020-06-29 14:37:36 +00:00
|
|
|
onTitleChanged;
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller)
|
2020-05-29 17:56:03 +00:00
|
|
|
iosOnDidReceiveServerRedirectForProvisionalNavigation;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
final void Function(InAppWebViewController controller)
|
2020-05-29 17:56:03 +00:00
|
|
|
iosOnWebContentProcessDidTerminate;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<AjaxRequestAction> Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, AjaxRequest ajaxRequest)
|
|
|
|
onAjaxProgress;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<AjaxRequestAction> Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, AjaxRequest ajaxRequest)
|
|
|
|
onAjaxReadyStateChange;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, ConsoleMessage consoleMessage)
|
|
|
|
onConsoleMessage;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
final Future<WebView> Function(InAppWebViewController controller,
|
|
|
|
CreateWindowRequest onCreateWindowRequest) onCreateWindow;
|
|
|
|
|
|
|
|
@override
|
2020-06-29 14:37:36 +00:00
|
|
|
final void Function(InAppWebViewController controller) onCloseWindow;
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
|
|
|
|
@override
|
2020-06-29 14:37:36 +00:00
|
|
|
final void Function(InAppWebViewController controller) onWindowFocus;
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
|
|
|
|
@override
|
2020-06-29 14:37:36 +00:00
|
|
|
final void Function(InAppWebViewController controller) onWindowBlur;
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
|
|
|
|
@override
|
2020-06-29 14:37:36 +00:00
|
|
|
final void Function(InAppWebViewController controller) androidOnRequestFocus;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller, String url)
|
2020-05-29 17:56:03 +00:00
|
|
|
onDownloadStart;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller, int activeMatchOrdinal,
|
|
|
|
int numberOfMatches, bool isDoneCounting) onFindResultReceived;
|
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<JsAlertResponse> Function(
|
2020-06-29 14:37:36 +00:00
|
|
|
InAppWebViewController controller, JsAlertRequest jsAlertRequest)
|
|
|
|
onJsAlert;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<JsConfirmResponse> Function(
|
2020-06-29 14:37:36 +00:00
|
|
|
InAppWebViewController controller, JsConfirmRequest jsConfirmRequest)
|
|
|
|
onJsConfirm;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
2020-06-29 14:37:36 +00:00
|
|
|
final Future<JsPromptResponse> Function(
|
|
|
|
InAppWebViewController controller, JsPromptRequest jsPromptRequest)
|
|
|
|
onJsPrompt;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller, String url, int code,
|
|
|
|
String message) onLoadError;
|
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller, String url,
|
|
|
|
int statusCode, String description) onLoadHttpError;
|
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, LoadedResource resource)
|
|
|
|
onLoadResource;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<CustomSchemeResponse> Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, String scheme, String url)
|
|
|
|
onLoadResourceCustomScheme;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller, String url)
|
2020-05-29 17:56:03 +00:00
|
|
|
onLoadStart;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller, String url) onLoadStop;
|
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller,
|
2020-05-21 01:34:39 +00:00
|
|
|
InAppWebViewHitTestResult hitTestResult) onLongPressHitTestResult;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller, String url) onPrint;
|
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller, int progress)
|
2020-05-29 17:56:03 +00:00
|
|
|
onProgressChanged;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<ClientCertResponse> Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, ClientCertChallenge challenge)
|
|
|
|
onReceivedClientCertRequest;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<HttpAuthResponse> Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, HttpAuthChallenge challenge)
|
|
|
|
onReceivedHttpAuthRequest;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<ServerTrustAuthResponse> Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, ServerTrustChallenge challenge)
|
|
|
|
onReceivedServerTrustAuthRequest;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller, int x, int y)
|
2020-05-29 17:56:03 +00:00
|
|
|
onScrollChanged;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, String url, bool androidIsReload)
|
|
|
|
onUpdateVisitedHistory;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller) onWebViewCreated;
|
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<AjaxRequest> Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, AjaxRequest ajaxRequest)
|
|
|
|
shouldInterceptAjaxRequest;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<FetchRequest> Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, FetchRequest fetchRequest)
|
|
|
|
shouldInterceptFetchRequest;
|
2020-05-11 00:48:41 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<ShouldOverrideUrlLoadingAction> Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller,
|
|
|
|
ShouldOverrideUrlLoadingRequest shouldOverrideUrlLoadingRequest)
|
|
|
|
shouldOverrideUrlLoading;
|
2020-05-23 17:33:54 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller) onEnterFullscreen;
|
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller) onExitFullscreen;
|
2020-05-28 23:03:45 +00:00
|
|
|
|
|
|
|
@override
|
2020-05-29 17:56:03 +00:00
|
|
|
final Future<WebResourceResponse> Function(
|
|
|
|
InAppWebViewController controller, WebResourceRequest request)
|
|
|
|
androidShouldInterceptRequest;
|
2020-05-28 23:03:45 +00:00
|
|
|
|
|
|
|
@override
|
2020-05-29 17:56:03 +00:00
|
|
|
final Future<WebViewRenderProcessAction> Function(
|
|
|
|
InAppWebViewController controller, String url)
|
|
|
|
androidOnRenderProcessUnresponsive;
|
2020-05-28 23:03:45 +00:00
|
|
|
|
|
|
|
@override
|
2020-05-29 17:56:03 +00:00
|
|
|
final Future<WebViewRenderProcessAction> Function(
|
|
|
|
InAppWebViewController controller, String url)
|
|
|
|
androidOnRenderProcessResponsive;
|
2020-05-28 23:03:45 +00:00
|
|
|
|
|
|
|
@override
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
final void Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, RenderProcessGoneDetail detail)
|
|
|
|
androidOnRenderProcessGone;
|
2020-05-28 23:03:45 +00:00
|
|
|
|
|
|
|
@override
|
2020-05-29 17:56:03 +00:00
|
|
|
final Future<FormResubmissionAction> Function(
|
|
|
|
InAppWebViewController controller, String url) androidOnFormResubmission;
|
2020-05-28 23:03:45 +00:00
|
|
|
|
|
|
|
@override
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
final void Function(
|
2020-05-29 17:56:03 +00:00
|
|
|
InAppWebViewController controller, double oldScale, double newScale)
|
|
|
|
androidOnScaleChanged;
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final void Function(InAppWebViewController controller, Uint8List icon)
|
2020-06-29 14:37:36 +00:00
|
|
|
androidOnReceivedIcon;
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
|
|
|
|
@override
|
2020-06-29 14:37:36 +00:00
|
|
|
final void Function(
|
|
|
|
InAppWebViewController controller, String url, bool precomposed)
|
|
|
|
androidOnReceivedTouchIconUrl;
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
final Future<JsBeforeUnloadResponse> Function(
|
2020-06-29 14:37:36 +00:00
|
|
|
InAppWebViewController controller,
|
|
|
|
JsBeforeUnloadRequest jsBeforeUnloadRequest) androidOnJsBeforeUnload;
|
Updated onCreateWindow, onJsAlert, onJsConfirm, and onJsPrompt webview events, added onCloseWindow, onTitleChanged, onWindowFocus, and onWindowBlur webview events, added androidOnRequestFocus, androidOnReceivedIcon, androidOnReceivedTouchIconUrl, androidOnJsBeforeUnload, and androidOnReceivedLoginRequest Android-specific webview events, fix #403
2020-06-29 14:34:08 +00:00
|
|
|
|
|
|
|
@override
|
2020-06-29 14:37:36 +00:00
|
|
|
final void Function(
|
|
|
|
InAppWebViewController controller, LoginRequest loginRequest)
|
|
|
|
androidOnReceivedLoginRequest;
|
2020-05-29 17:56:03 +00:00
|
|
|
}
|