AndroidHeadlessInAppWebViewCreationParams class
Object specifying creation parameters for creating a AndroidHeadlessInAppWebView.
When adding additional fields make sure they can be null or have a default
value to avoid breaking changes. See PlatformHeadlessInAppWebViewCreationParams for
more information.
- Annotations
Constructors
-
AndroidHeadlessInAppWebViewCreationParams({dynamic controllerFromPlatform(PlatformInAppWebViewController controller)?, Size initialSize = const Size(-1, -1), int? windowId, void onWebViewCreated(dynamic controller)?, void onLoadStart(dynamic controller, WebUri? url)?, void onLoadStop(dynamic controller, WebUri? url)?, void onReceivedError(dynamic controller, WebResourceRequest request, WebResourceError error)?, void onReceivedHttpError(dynamic controller, WebResourceRequest request, WebResourceResponse errorResponse)?, void onProgressChanged(dynamic controller, int progress)?, void onConsoleMessage(dynamic controller, ConsoleMessage consoleMessage)?, Future<
NavigationActionPolicy?> shouldOverrideUrlLoading(dynamic controller, )?, void onLoadResource(dynamic controller, LoadedResource resource)?, void onScrollChanged(dynamic controller, int x, int y)?, void onDownloadStartRequest(dynamic controller, DownloadStartRequest downloadStartRequest)?, Future<CustomSchemeResponse?> onLoadResourceWithCustomScheme(dynamic controller, WebResourceRequest request)?, Future<bool?> onCreateWindow(dynamic controller, CreateWindowAction createWindowAction)?, void onCloseWindow(dynamic controller)?, Future<JsAlertResponse?> onJsAlert(dynamic controller, JsAlertRequest jsAlertRequest)?, Future<JsConfirmResponse?> onJsConfirm(dynamic controller, JsConfirmRequest jsConfirmRequest)?, Future<JsPromptResponse?> onJsPrompt(dynamic controller, JsPromptRequest jsPromptRequest)?, Future<HttpAuthResponse?> onReceivedHttpAuthRequest(dynamic controller, HttpAuthenticationChallenge challenge)?, Future<ServerTrustAuthResponse?> onReceivedServerTrustAuthRequest(dynamic controller, ServerTrustChallenge challenge)?, Future<ClientCertResponse?> onReceivedClientCertRequest(dynamic controller, ClientCertChallenge challenge)?, Future<AjaxRequest?> shouldInterceptAjaxRequest(dynamic controller, AjaxRequest ajaxRequest)?, Future<AjaxRequestAction?> onAjaxReadyStateChange(dynamic controller, AjaxRequest ajaxRequest)?, Future<AjaxRequestAction?> onAjaxProgress(dynamic controller, AjaxRequest ajaxRequest)?, Future<FetchRequest?> shouldInterceptFetchRequest(dynamic controller, FetchRequest fetchRequest)?, void onUpdateVisitedHistory(dynamic controller, WebUri? url, bool? isReload)?, Future<bool?> onPrintRequest(dynamic controller, WebUri? url, PlatformPrintJobController? printJobController)?, void onLongPressHitTestResult(dynamic controller, InAppWebViewHitTestResult hitTestResult)?, void onEnterFullscreen(dynamic controller)?, void onExitFullscreen(dynamic controller)?, void onPageCommitVisible(dynamic controller, WebUri? url)?, void onTitleChanged(dynamic controller, String? title)?, void onWindowFocus(dynamic controller)?, void onWindowBlur(dynamic controller)?, void onOverScrolled(dynamic controller, int x, int y, bool clampedX, bool clampedY)?, void onZoomScaleChanged(dynamic controller, double oldScale, double newScale)?, Future<SafeBrowsingResponse?> onSafeBrowsingHit(dynamic controller, WebUri url, SafeBrowsingThreat? threatType)?, Future<PermissionResponse?> onPermissionRequest(dynamic controller, PermissionRequest permissionRequest)?, Future<GeolocationPermissionShowPromptResponse?> onGeolocationPermissionsShowPrompt(dynamic controller, String origin)?, void onGeolocationPermissionsHidePrompt(dynamic controller)?, Future<WebResourceResponse?> shouldInterceptRequest(dynamic controller, WebResourceRequest request)?, void onRenderProcessGone(dynamic controller, RenderProcessGoneDetail detail)?, void onRenderProcessResponsive(dynamic controller)?, void onRenderProcessUnresponsive(dynamic controller)?, Future<FormResubmissionAction?> onFormResubmission(dynamic controller, WebUri? url)?, void onReceivedIcon(dynamic controller, Uint8List icon)?, void onReceivedTouchIconUrl(dynamic controller, WebUri url, bool precomposed)?, Future<JsBeforeUnloadResponse?> onJsBeforeUnload(dynamic controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)?, void onReceivedLoginRequest(dynamic controller, LoginRequest loginRequest)?, void onPermissionRequestCanceled(dynamic controller, PermissionRequest permissionRequest)?, void onRequestFocus(dynamic controller)?, void onWebContentProcessDidTerminate(dynamic controller)?, Future<ShouldAllowDeprecatedTLSAction?> shouldAllowDeprecatedTLS(dynamic controller, URLAuthenticationChallenge challenge)?, Future<void> onCameraCaptureStateChanged(dynamic controller, MediaCaptureState? oldState, MediaCaptureState? newState)?, Future<void> onMicrophoneCaptureStateChanged(dynamic controller, MediaCaptureState? oldState, MediaCaptureState? newState)?, void onContentSizeChanged(dynamic controller, Size oldContentSize, Size newContentSize)?, URLRequest? initialUrlRequest, String? initialFile, InAppWebViewInitialData? initialData, InAppWebViewSettings? initialSettings, ContextMenu? contextMenu, UnmodifiableListView<UserScript> ? initialUserScripts, AndroidPullToRefreshController? pullToRefreshController, AndroidFindInteractionController? findInteractionController}) - Creates a new AndroidHeadlessInAppWebViewCreationParams instance.
- AndroidHeadlessInAppWebViewCreationParams.fromPlatformHeadlessInAppWebViewCreationParams(PlatformHeadlessInAppWebViewCreationParams params)
-
Creates a AndroidHeadlessInAppWebViewCreationParams instance based on
PlatformHeadlessInAppWebViewCreationParams.
Properties
- contextMenu → ContextMenu?
-
Context menu which contains custom menu items to be shown when
ContextMenuis presented.finalinherited - controllerFromPlatform → dynamic Function(PlatformInAppWebViewController controller)?
-
finalinherited
- findInteractionController → AndroidFindInteractionController?
-
Represents the find interaction feature controller.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialData → InAppWebViewInitialData?
-
Initial
InAppWebViewInitialDatathat will be loaded.finalinherited - initialFile → String?
-
Initial asset file that will be loaded. See
InAppWebViewController.loadFilefor explanation.finalinherited - initialSettings → InAppWebViewSettings?
-
Initial settings that will be used.
finalinherited
- initialSize → Size
-
The WebView initial size in pixels.
finalinherited
- initialUrlRequest → URLRequest?
-
Initial url request that will be loaded.
finalinherited
-
initialUserScripts
→ UnmodifiableListView<
UserScript> ? -
Initial list of user scripts to be loaded at start or end of a page loading.
To add or remove user scripts, you have to use the
InAppWebViewController's methods such asInAppWebViewController.addUserScript,InAppWebViewController.removeUserScript,InAppWebViewController.removeAllUserScripts, etc.finalinherited -
onAjaxProgress
→ Future<
AjaxRequestAction?> Function(dynamic controller, AjaxRequest ajaxRequest)? -
Event fired as an
XMLHttpRequestprogress. It gives the host application a chance to abort the request.finalinherited -
onAjaxReadyStateChange
→ Future<
AjaxRequestAction?> Function(dynamic controller, AjaxRequest ajaxRequest)? -
Event fired whenever the
readyStateattribute of anXMLHttpRequestchanges. It gives the host application a chance to abort the request.finalinherited -
onCameraCaptureStateChanged
→ Future<
void> Function(dynamic controller, MediaCaptureState? oldState, MediaCaptureState? newState)? -
Event fired when a change in the camera capture state occurred.
finalinherited
- onCloseWindow → void Function(dynamic controller)?
-
Event fired when the host application should close the given WebView and remove it from the view system if necessary.
At this point, WebCore has stopped any loading in this window and has removed any cross-scripting ability in javascript.
finalinherited
- onConsoleMessage → void Function(dynamic controller, ConsoleMessage consoleMessage)?
-
Event fired when the
WebViewreceives aConsoleMessage.finalinherited - onContentSizeChanged → void Function(dynamic controller, Size oldContentSize, Size newContentSize)?
-
Event fired when the content size of the
WebViewchanges.finalinherited -
onCreateWindow
→ Future<
bool?> Function(dynamic controller, CreateWindowAction createWindowAction)? -
Event fired when the
WebViewrequests the host application to create a new window, for example when trying to open a link withtarget="_blank"or whenwindow.open()is called by JavaScript side. If the host application chooses to honor this request, it should returntruefrom this method, create a new WebView to host the window. If the host application chooses not to honor the request, it should returnfalsefrom this method. The default implementation of this method does nothing and hence returnsfalse.finalinherited -
Called when a web view receives a server redirect.
finalinherited
- onDownloadStartRequest → void Function(dynamic controller, DownloadStartRequest downloadStartRequest)?
-
Event fired when
WebViewrecognizes a downloadable file. To download the file, you can use the flutter_downloader plugin.finalinherited - onEnterFullscreen → void Function(dynamic controller)?
-
Event fired when the current page has entered full screen mode.
finalinherited
- onExitFullscreen → void Function(dynamic controller)?
-
Event fired when the current page has exited full screen mode.
finalinherited
- onFindResultReceived → void Function(int activeMatchOrdinal, int numberOfMatches, bool isDoneCounting)?
-
Event fired when a find result is received.
finalinherited
-
onFormResubmission
→ Future<
FormResubmissionAction?> Function(dynamic controller, WebUri? url)? -
As the host application if the browser should resend data as the requested page was the result of a POST. The default is to not resend the data.
finalinherited
- onGeolocationPermissionsHidePrompt → void Function(dynamic controller)?
-
Event fired when the webview is hiding the geolocation permission prompt.
finalinherited
-
onGeolocationPermissionsShowPrompt
→ Future<
GeolocationPermissionShowPromptResponse?> Function(dynamic controller, String origin)? -
Event fired when the webview is requesting a permission to access the geolocation.
finalinherited
-
onJsAlert
→ Future<
JsAlertResponse?> Function(dynamic controller, JsAlertRequest jsAlertRequest)? -
Event fired when javascript calls the
alert()method to display an alert dialog. IfJsAlertResponse.handledByClientistrue, the webview will assume that the client will handle the dialog.finalinherited -
onJsBeforeUnload
→ Future<
JsBeforeUnloadResponse?> Function(dynamic controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)? -
Event fired when the client should display a dialog to confirm navigation away from the current page.
This is the result of the
onbeforeunloadjavascript event. IfJsBeforeUnloadResponse.handledByClientistrue, WebView will assume that the client will handle the confirm dialog. IfJsBeforeUnloadResponse.handledByClientisfalse, a default value oftruewill be returned to javascript to accept navigation away from the current page. The default behavior is to returnfalse. Setting theJsBeforeUnloadResponse.actiontoJsBeforeUnloadResponseAction.CONFIRMwill navigate away from the current page,JsBeforeUnloadResponseAction.CANCELwill cancel the navigation.finalinherited -
onJsConfirm
→ Future<
JsConfirmResponse?> Function(dynamic controller, JsConfirmRequest jsConfirmRequest)? -
Event fired when javascript calls the
confirm()method to display a confirm dialog. IfJsConfirmResponse.handledByClientistrue, the webview will assume that the client will handle the dialog.finalinherited -
onJsPrompt
→ Future<
JsPromptResponse?> Function(dynamic controller, JsPromptRequest jsPromptRequest)? -
Event fired when javascript calls the
prompt()method to display a prompt dialog. IfJsPromptResponse.handledByClientistrue, the webview will assume that the client will handle the dialog.finalinherited - onLoadResource → void Function(dynamic controller, LoadedResource resource)?
-
Event fired when the
WebViewloads a resource.finalinherited -
onLoadResourceWithCustomScheme
→ Future<
CustomSchemeResponse?> Function(dynamic controller, WebResourceRequest request)? -
Event fired when the
WebViewfinds thecustom-schemewhile loading a resource. Here you can handle the urlrequestand return aCustomSchemeResponseto load a specific resource encoded tobase64.finalinherited - onLoadStart → void Function(dynamic controller, WebUri? url)?
-
Event fired when the
WebViewstarts to load anurl.finalinherited - onLoadStop → void Function(dynamic controller, WebUri? url)?
-
Event fired when the
WebViewfinishes loading anurl.finalinherited - onLongPressHitTestResult → void Function(dynamic controller, InAppWebViewHitTestResult hitTestResult)?
-
Event fired when an HTML element of the webview has been clicked and held.
finalinherited
-
onMicrophoneCaptureStateChanged
→ Future<
void> Function(dynamic controller, MediaCaptureState? oldState, MediaCaptureState? newState)? -
Event fired when a change in the microphone capture state occurred.
finalinherited
-
Called when a web view asks for permission to navigate to new content after the response to the navigation request is known.
finalinherited
- onOverScrolled → void Function(dynamic controller, int x, int y, bool clampedX, bool clampedY)?
-
Event fired to respond to the results of an over-scroll operation.
finalinherited
- onPageCommitVisible → void Function(dynamic controller, WebUri? url)?
-
Called when the web view begins to receive web content.
finalinherited
-
onPermissionRequest
→ Future<
PermissionResponse?> Function(dynamic controller, PermissionRequest permissionRequest)? -
Event fired when the webview is requesting a permission to access a specific resource.
finalinherited
- onPermissionRequestCanceled → void Function(dynamic controller, PermissionRequest permissionRequest)?
-
Notify the host application that the given permission request has been canceled. Any related UI should therefore be hidden.
finalinherited
-
onPrintRequest
→ Future<
bool?> Function(dynamic controller, WebUri? url, PlatformPrintJobController? printJobController)? -
Event fired when
window.print()is called from JavaScript side. Returntrueif you want to handle the print job. Otherwise returnfalse, so thePlatformPrintJobControllerwill be handled and disposed automatically by the system.finalinherited - onProgressChanged → void Function(dynamic controller, int progress)?
-
Event fired when the current
progressof loading a page is changed.finalinherited -
onReceivedClientCertRequest
→ Future<
ClientCertResponse?> Function(dynamic controller, ClientCertChallenge challenge)? -
Notify the host application to handle an SSL client certificate request.
Webview stores the response in memory (for the life of the application) if
ClientCertResponseAction.PROCEEDorClientCertResponseAction.CANCELis called and does not callonReceivedClientCertRequestagain for the same host and port pair. Note that, multiple layers in chromium network stack might be caching the responses.finalinherited - onReceivedError → void Function(dynamic controller, WebResourceRequest request, WebResourceError error)?
-
Event fired when the
WebViewencounters anerrorloading arequest.finalinherited -
onReceivedHttpAuthRequest
→ Future<
HttpAuthResponse?> Function(dynamic controller, HttpAuthenticationChallenge challenge)? -
Event fired when the WebView received an HTTP authentication request. The default behavior is to cancel the request.
finalinherited
- onReceivedHttpError → void Function(dynamic controller, WebResourceRequest request, WebResourceResponse errorResponse)?
-
Event fired when the
WebViewreceives an HTTP error.finalinherited - onReceivedIcon → void Function(dynamic controller, Uint8List icon)?
-
Event fired when the document title of the current page has been received.
finalinherited
- onReceivedLoginRequest → void Function(dynamic controller, LoginRequest loginRequest)?
-
Event fired when a request to automatically log in the user has been processed.
finalinherited
-
onReceivedServerTrustAuthRequest
→ Future<
ServerTrustAuthResponse?> Function(dynamic controller, ServerTrustChallenge challenge)? -
Event fired when the WebView need to perform server trust authentication (certificate validation).
The host application must return either
ServerTrustAuthResponseinstance withServerTrustAuthResponseAction.CANCELorServerTrustAuthResponseAction.PROCEED.finalinherited - onReceivedTouchIconUrl → void Function(dynamic controller, WebUri url, bool precomposed)?
-
Event fired when there is a new favicon for the current page.
finalinherited
- onRenderProcessGone → void Function(dynamic controller, RenderProcessGoneDetail detail)?
-
Event fired when the given WebView's render process has exited.
The cause of the render process exit can be anything from a crash due to a bug in the WebView to a memory-intensive process being killed by the system.
finalinherited
- onRenderProcessResponsive → void Function(dynamic controller)?
-
Event fired when the WebView's render process has become responsive again.
finalinherited
- onRenderProcessUnresponsive → void Function(dynamic controller)?
-
Event fired when the WebView's render process has become unresponsive.
finalinherited
- onRequestFocus → void Function(dynamic controller)?
-
Request display and focus for this WebView.
This may happen due to another WebView opening a link in this WebView and requesting that this WebView be displayed.
finalinherited
-
onSafeBrowsingHit
→ Future<
SafeBrowsingResponse?> Function(dynamic controller, WebUri url, SafeBrowsingThreat? threatType)? -
Event fired when the webview notifies that a loading has been flagged by Safe Browsing.
The Safe Browsing hit is for the
urlwith a specificthreatType.finalinherited - onScrollChanged → void Function(dynamic controller, int x, int y)?
-
Event fired when the
WebViewscrolls.finalinherited - onTitleChanged → void Function(dynamic controller, String? title)?
-
Event fired when a change in the document title occurred.
finalinherited
- onUpdateVisitedHistory → void Function(dynamic controller, WebUri? url, bool? isReload)?
-
Event fired when the host application updates its visited links database.
This event is also fired when the navigation state of the
WebViewchanges through the usage of javascript History API functions (pushState(),replaceState()) andonpopstateevent or, also, when the javascriptwindow.locationchanges without reloading the webview (for example appending or modifying a hash to the url).finalinherited - onWebContentProcessDidTerminate → void Function(dynamic controller)?
-
Invoked when the web view's web content process is terminated.
finalinherited
- onWebViewCreated → void Function(dynamic controller)?
-
Event fired when the
WebViewis created.finalinherited - onWindowBlur → void Function(dynamic controller)?
-
Event fired when the JavaScript
windowobject of the WebView has lost focus. This is the result of theblurJavaScript event applied to thewindowobject.finalinherited - onWindowFocus → void Function(dynamic controller)?
-
Event fired when the JavaScript
windowobject of the WebView has received focus. This is the result of thefocusJavaScript event applied to thewindowobject.finalinherited - onZoomScaleChanged → void Function(dynamic controller, double oldScale, double newScale)?
-
Event fired when the zoom scale of the
WebViewchanges.finalinherited - pullToRefreshController → AndroidPullToRefreshController?
-
Represents the pull-to-refresh feature controller.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
shouldAllowDeprecatedTLS
→ Future<
ShouldAllowDeprecatedTLSAction?> Function(dynamic controller, URLAuthenticationChallenge challenge)? -
Called when a web view asks whether to continue with a connection that uses a deprecated version of TLS (v1.0 and v1.1).
finalinherited
-
shouldInterceptAjaxRequest
→ Future<
AjaxRequest?> Function(dynamic controller, AjaxRequest ajaxRequest)? -
Event fired when an
XMLHttpRequestis sent to a server. It gives the host application a chance to take control over the request before sending it.finalinherited -
shouldInterceptFetchRequest
→ Future<
FetchRequest?> Function(dynamic controller, FetchRequest fetchRequest)? -
Event fired when a request is sent to a server through Fetch API.
It gives the host application a chance to take control over the request before sending it.
finalinherited
-
shouldInterceptRequest
→ Future<
WebResourceResponse?> Function(dynamic controller, WebResourceRequest request)? -
Notify the host application of a resource request and allow the application to return the data.
If the return value is
null, the WebView will continue to load the resource as usual. Otherwise, the return response and data will be used.finalinherited -
shouldOverrideUrlLoading
→ Future<
NavigationActionPolicy?> Function(dynamic controller, )? -
Give the host application a chance to take control when a URL is about to be loaded in the current WebView.
finalinherited
- webViewEnvironment → PlatformWebViewEnvironment?
-
Used to create the
PlatformHeadlessInAppWebViewusing the specified environment.finalinherited - windowId → int?
-
The window id of a
CreateWindowAction.windowId.finalinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited