InAppWebView class

Flutter Widget for adding an inline native WebView integrated in the flutter widget tree.

Inheritance

Constructors

InAppWebView({Key? key, Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers, int? windowId, InAppWebViewPreloader? preloader, HeadlessInAppWebView? headlessWebView, InAppWebViewKeepAlive? keepAlive, bool? preventGestureDelay, TextDirection? layoutDirection, WebViewEnvironment? webViewEnvironment, @Deprecated('Use onGeolocationPermissionsHidePrompt instead') void androidOnGeolocationPermissionsHidePrompt(InAppWebViewController controller)?, @Deprecated('Use onGeolocationPermissionsShowPrompt instead') FutureOr<GeolocationPermissionShowPromptResponse?> androidOnGeolocationPermissionsShowPrompt(InAppWebViewController controller, String origin)?, @Deprecated('Use onPermissionRequest instead') FutureOr<PermissionRequestResponse?> androidOnPermissionRequest(InAppWebViewController controller, String origin, List<String> resources)?, @Deprecated('Use onSafeBrowsingHit instead') FutureOr<SafeBrowsingResponse?> androidOnSafeBrowsingHit(InAppWebViewController controller, Uri url, SafeBrowsingThreat? threatType)?, InAppWebViewInitialData? initialData, String? initialFile, @Deprecated('Use initialSettings instead') InAppWebViewGroupOptions? initialOptions, InAppWebViewSettings? initialSettings, URLRequest? initialUrlRequest, UnmodifiableListView<UserScript>? initialUserScripts, PullToRefreshController? pullToRefreshController, FindInteractionController? findInteractionController, ContextMenu? contextMenu, void onContentLoading(InAppWebViewController controller, WebUri? url)?, void onDOMContentLoaded(InAppWebViewController controller, WebUri? url)?, void onPageCommitVisible(InAppWebViewController controller, WebUri? url)?, void onTitleChanged(InAppWebViewController controller, String? title)?, @Deprecated('Use onDidReceiveServerRedirectForProvisionalNavigation instead') void iosOnDidReceiveServerRedirectForProvisionalNavigation(InAppWebViewController controller)?, @Deprecated('Use onWebContentProcessDidTerminate instead') void iosOnWebContentProcessDidTerminate(InAppWebViewController controller)?, @Deprecated('Use onNavigationResponse instead') FutureOr<IOSNavigationResponseAction?> iosOnNavigationResponse(InAppWebViewController controller, IOSWKNavigationResponse navigationResponse)?, @Deprecated('Use shouldAllowDeprecatedTLS instead') FutureOr<IOSShouldAllowDeprecatedTLSAction?> iosShouldAllowDeprecatedTLS(InAppWebViewController controller, URLAuthenticationChallenge challenge)?, FutureOr<AjaxRequestAction?> onAjaxProgress(InAppWebViewController controller, AjaxRequest ajaxRequest)?, FutureOr<AjaxRequestAction?> onAjaxReadyStateChange(InAppWebViewController controller, AjaxRequest ajaxRequest)?, void onConsoleMessage(InAppWebViewController controller, ConsoleMessage consoleMessage)?, FutureOr<bool?> onCreateWindow(InAppWebViewController controller, CreateWindowAction createWindowAction)?, void onCloseWindow(InAppWebViewController controller)?, void onWindowFocus(InAppWebViewController controller)?, void onWindowBlur(InAppWebViewController controller)?, @Deprecated('Use onReceivedIcon instead') void androidOnReceivedIcon(InAppWebViewController controller, Uint8List icon)?, @Deprecated('Use onReceivedTouchIconUrl instead') void androidOnReceivedTouchIconUrl(InAppWebViewController controller, Uri url, bool precomposed)?, @Deprecated('Use onDownloadStarting instead') void onDownloadStart(InAppWebViewController controller, Uri url)?, @Deprecated('Use onDownloadStarting instead') void onDownloadStartRequest(InAppWebViewController controller, DownloadStartRequest downloadStartRequest)?, FutureOr<DownloadStartResponse?> onDownloadStarting(InAppWebViewController controller, DownloadStartRequest downloadStartRequest)?, @Deprecated('Use FindInteractionController.onFindResultReceived instead') void onFindResultReceived(InAppWebViewController controller, int activeMatchOrdinal, int numberOfMatches, bool isDoneCounting)?, FutureOr<JsAlertResponse?> onJsAlert(InAppWebViewController controller, JsAlertRequest jsAlertRequest)?, FutureOr<JsConfirmResponse?> onJsConfirm(InAppWebViewController controller, JsConfirmRequest jsConfirmRequest)?, FutureOr<JsPromptResponse?> onJsPrompt(InAppWebViewController controller, JsPromptRequest jsPromptRequest)?, @Deprecated("Use onReceivedError instead") void onLoadError(InAppWebViewController controller, Uri? url, int code, String message)?, void onReceivedError(InAppWebViewController controller, WebResourceRequest request, WebResourceError error)?, @Deprecated("Use onReceivedHttpError instead") void onLoadHttpError(InAppWebViewController controller, Uri? url, int code, String message)?, void onReceivedHttpError(InAppWebViewController controller, WebResourceRequest request, WebResourceResponse errorResponse)?, void onLoadResource(InAppWebViewController controller, LoadedResource resource)?, @Deprecated('Use onLoadResourceWithCustomScheme instead') FutureOr<CustomSchemeResponse?> onLoadResourceCustomScheme(InAppWebViewController controller, Uri url)?, FutureOr<CustomSchemeResponse?> onLoadResourceWithCustomScheme(InAppWebViewController controller, WebResourceRequest request)?, void onLoadStart(InAppWebViewController controller, WebUri? url)?, void onLoadStop(InAppWebViewController controller, WebUri? url)?, void onLongPressHitTestResult(InAppWebViewController controller, InAppWebViewHitTestResult hitTestResult)?, @Deprecated("Use onPrintRequest instead") void onPrint(InAppWebViewController controller, Uri? url)?, FutureOr<bool?> onPrintRequest(InAppWebViewController controller, WebUri? url, PlatformPrintJobController? printJobController)?, void onProgressChanged(InAppWebViewController controller, int progress)?, FutureOr<ClientCertResponse?> onReceivedClientCertRequest(InAppWebViewController controller, ClientCertChallenge challenge)?, FutureOr<HttpAuthResponse?> onReceivedHttpAuthRequest(InAppWebViewController controller, HttpAuthenticationChallenge challenge)?, FutureOr<ServerTrustAuthResponse?> onReceivedServerTrustAuthRequest(InAppWebViewController controller, ServerTrustChallenge challenge)?, void onScrollChanged(InAppWebViewController controller, int x, int y)?, void onUpdateVisitedHistory(InAppWebViewController controller, WebUri? url, bool? isReload)?, void onWebViewCreated(InAppWebViewController controller)?, FutureOr<AjaxRequest?> shouldInterceptAjaxRequest(InAppWebViewController controller, AjaxRequest ajaxRequest)?, FutureOr<FetchRequest?> shouldInterceptFetchRequest(InAppWebViewController controller, FetchRequest fetchRequest)?, FutureOr<NavigationActionPolicy?> shouldOverrideUrlLoading(InAppWebViewController controller, NavigationAction navigationAction)?, void onEnterFullscreen(InAppWebViewController controller)?, void onExitFullscreen(InAppWebViewController controller)?, void onOverScrolled(InAppWebViewController controller, int x, int y, bool clampedX, bool clampedY)?, void onZoomScaleChanged(InAppWebViewController controller, double oldScale, double newScale)?, @Deprecated('Use shouldInterceptRequest instead') FutureOr<WebResourceResponse?> androidShouldInterceptRequest(InAppWebViewController controller, WebResourceRequest request)?, @Deprecated('Use onRenderProcessUnresponsive instead') FutureOr<WebViewRenderProcessAction?> androidOnRenderProcessUnresponsive(InAppWebViewController controller, Uri? url)?, @Deprecated('Use onRenderProcessResponsive instead') FutureOr<WebViewRenderProcessAction?> androidOnRenderProcessResponsive(InAppWebViewController controller, Uri? url)?, @Deprecated('Use onRenderProcessGone instead') void androidOnRenderProcessGone(InAppWebViewController controller, RenderProcessGoneDetail detail)?, @Deprecated('Use onFormResubmission instead') FutureOr<FormResubmissionAction?> androidOnFormResubmission(InAppWebViewController controller, Uri? url)?, @Deprecated('Use onZoomScaleChanged instead') void androidOnScaleChanged(InAppWebViewController controller, double oldScale, double newScale)?, @Deprecated('Use onJsBeforeUnload instead') FutureOr<JsBeforeUnloadResponse?> androidOnJsBeforeUnload(InAppWebViewController controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)?, @Deprecated('Use onReceivedLoginRequest instead') void androidOnReceivedLoginRequest(InAppWebViewController controller, LoginRequest loginRequest)?, void onDidReceiveServerRedirectForProvisionalNavigation(InAppWebViewController controller)?, FutureOr<FormResubmissionAction?> onFormResubmission(InAppWebViewController controller, WebUri? url)?, void onGeolocationPermissionsHidePrompt(InAppWebViewController controller)?, FutureOr<GeolocationPermissionShowPromptResponse?> onGeolocationPermissionsShowPrompt(InAppWebViewController controller, String origin)?, FutureOr<JsBeforeUnloadResponse?> onJsBeforeUnload(InAppWebViewController controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)?, FutureOr<NavigationResponseAction?> onNavigationResponse(InAppWebViewController controller, NavigationResponse navigationResponse)?, FutureOr<PermissionResponse?> onPermissionRequest(InAppWebViewController controller, PermissionRequest permissionRequest)?, @Deprecated('Use onFaviconChanged instead') void onReceivedIcon(InAppWebViewController controller, Uint8List icon)?, void onFaviconChanged(InAppWebViewController controller, FaviconChangedRequest faviconChangedRequest)?, void onReceivedLoginRequest(InAppWebViewController controller, LoginRequest loginRequest)?, void onPermissionRequestCanceled(InAppWebViewController controller, PermissionRequest permissionRequest)?, void onRequestFocus(InAppWebViewController controller)?, void onReceivedTouchIconUrl(InAppWebViewController controller, WebUri url, bool precomposed)?, void onRenderProcessGone(InAppWebViewController controller, RenderProcessGoneDetail detail)?, FutureOr<WebViewRenderProcessAction?> onRenderProcessResponsive(InAppWebViewController controller, WebUri? url)?, FutureOr<WebViewRenderProcessAction?> onRenderProcessUnresponsive(InAppWebViewController controller, WebUri? url)?, FutureOr<SafeBrowsingResponse?> onSafeBrowsingHit(InAppWebViewController controller, WebUri url, SafeBrowsingThreat? threatType)?, void onWebContentProcessDidTerminate(InAppWebViewController controller)?, FutureOr<ShouldAllowDeprecatedTLSAction?> shouldAllowDeprecatedTLS(InAppWebViewController controller, URLAuthenticationChallenge challenge)?, FutureOr<WebResourceResponse?> shouldInterceptRequest(InAppWebViewController controller, WebResourceRequest request)?, FutureOr<void> onCameraCaptureStateChanged(InAppWebViewController controller, MediaCaptureState? oldState, MediaCaptureState? newState)?, FutureOr<void> onMicrophoneCaptureStateChanged(InAppWebViewController controller, MediaCaptureState? oldState, MediaCaptureState? newState)?, void onContentSizeChanged(InAppWebViewController controller, Size oldContentSize, Size newContentSize)?, void onProcessFailed(InAppWebViewController controller, ProcessFailedDetail detail)?, FutureOr<NotificationReceivedResponse?> onNotificationReceived(InAppWebViewController controller, NotificationReceivedRequest request)?, FutureOr<SaveAsUIShowingResponse?> onSaveAsUIShowing(InAppWebViewController controller, SaveAsUIShowingRequest request)?, FutureOr<SaveFileSecurityCheckStartingResponse?> onSaveFileSecurityCheckStarting(InAppWebViewController controller, SaveFileSecurityCheckStartingRequest request)?, FutureOr<ScreenCaptureStartingResponse?> onScreenCaptureStarting(InAppWebViewController controller, ScreenCaptureStartingRequest request)?, void onAcceleratorKeyPressed(InAppWebViewController controller, AcceleratorKeyPressedDetail detail)?, FutureOr<ShowFileChooserResponse?> onShowFileChooser(InAppWebViewController controller, ShowFileChooserRequest request)?, FutureOr<LaunchingExternalUriSchemeResponse?> onLaunchingExternalUriScheme(InAppWebViewController controller, LaunchingExternalUriSchemeRequest request)?})
Flutter Widget for adding an inline native WebView integrated in the flutter widget tree.
InAppWebView.fromPlatform({Key? key, required PlatformInAppWebViewWidget platform})
Constructs a InAppWebView from a specific platform implementation.
InAppWebView.fromPlatformCreationParams({Key? key, required PlatformInAppWebViewWidgetCreationParams params})
Constructs a InAppWebView.

Properties

hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
platform PlatformInAppWebViewWidget
Implementation of PlatformInAppWebView for the current platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _InAppWebViewState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

isClassSupported({TargetPlatform? platform}) bool
Check if the current class is supported by the defaultTargetPlatform or a specific platform.
isPropertySupported(dynamic property, {TargetPlatform? platform}) bool
Check if the given property is supported by the defaultTargetPlatform or a specific platform. The property should be one of the PlatformWebViewCreationParamsProperty or PlatformInAppWebViewWidgetCreationParamsProperty values.