InAppWebView class

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

Officially Supported Platforms/Implementations:

  • Android native WebView
  • iOS
  • Web
Inheritance

Constructors

InAppWebView({Key? key, Set<Factory<OneSequenceGestureRecognizer>>? gestureRecognizers, int? windowId, HeadlessInAppWebView? headlessWebView, InAppWebViewKeepAlive? keepAlive, bool? preventGestureDelay, TextDirection? layoutDirection, @Deprecated('Use onGeolocationPermissionsHidePrompt instead') void androidOnGeolocationPermissionsHidePrompt(InAppWebViewController controller)?, @Deprecated('Use onGeolocationPermissionsShowPrompt instead') Future<GeolocationPermissionShowPromptResponse?> androidOnGeolocationPermissionsShowPrompt(InAppWebViewController controller, String origin)?, @Deprecated('Use onPermissionRequest instead') Future<PermissionRequestResponse?> androidOnPermissionRequest(InAppWebViewController controller, String origin, List<String> resources)?, @Deprecated('Use onSafeBrowsingHit instead') Future<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 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') Future<IOSNavigationResponseAction?> iosOnNavigationResponse(InAppWebViewController controller, IOSWKNavigationResponse navigationResponse)?, @Deprecated('Use shouldAllowDeprecatedTLS instead') Future<IOSShouldAllowDeprecatedTLSAction?> iosShouldAllowDeprecatedTLS(InAppWebViewController controller, URLAuthenticationChallenge challenge)?, Future<AjaxRequestAction> onAjaxProgress(InAppWebViewController controller, AjaxRequest ajaxRequest)?, Future<AjaxRequestAction?> onAjaxReadyStateChange(InAppWebViewController controller, AjaxRequest ajaxRequest)?, void onConsoleMessage(InAppWebViewController controller, ConsoleMessage consoleMessage)?, Future<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 onDownloadStartRequest instead') void onDownloadStart(InAppWebViewController controller, Uri url)?, void onDownloadStartRequest(InAppWebViewController controller, DownloadStartRequest downloadStartRequest)?, @Deprecated('Use FindInteractionController.onFindResultReceived instead') void onFindResultReceived(InAppWebViewController controller, int activeMatchOrdinal, int numberOfMatches, bool isDoneCounting)?, Future<JsAlertResponse?> onJsAlert(InAppWebViewController controller, JsAlertRequest jsAlertRequest)?, Future<JsConfirmResponse?> onJsConfirm(InAppWebViewController controller, JsConfirmRequest jsConfirmRequest)?, Future<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 statusCode, String description)?, void onReceivedHttpError(InAppWebViewController controller, WebResourceRequest request, WebResourceResponse errorResponse)?, void onLoadResource(InAppWebViewController controller, LoadedResource resource)?, @Deprecated('Use onLoadResourceWithCustomScheme instead') Future<CustomSchemeResponse?> onLoadResourceCustomScheme(InAppWebViewController controller, Uri url)?, Future<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)?, Future<bool?> onPrintRequest(InAppWebViewController controller, WebUri? url, PlatformPrintJobController? printJobController)?, void onProgressChanged(InAppWebViewController controller, int progress)?, Future<ClientCertResponse?> onReceivedClientCertRequest(InAppWebViewController controller, URLAuthenticationChallenge challenge)?, Future<HttpAuthResponse?> onReceivedHttpAuthRequest(InAppWebViewController controller, URLAuthenticationChallenge challenge)?, Future<ServerTrustAuthResponse?> onReceivedServerTrustAuthRequest(InAppWebViewController controller, URLAuthenticationChallenge challenge)?, void onScrollChanged(InAppWebViewController controller, int x, int y)?, void onUpdateVisitedHistory(InAppWebViewController controller, WebUri? url, bool? isReload)?, void onWebViewCreated(InAppWebViewController controller)?, Future<AjaxRequest?> shouldInterceptAjaxRequest(InAppWebViewController controller, AjaxRequest ajaxRequest)?, Future<FetchRequest?> shouldInterceptFetchRequest(InAppWebViewController controller, FetchRequest fetchRequest)?, Future<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') Future<WebResourceResponse?> androidShouldInterceptRequest(InAppWebViewController controller, WebResourceRequest request)?, @Deprecated('Use onRenderProcessUnresponsive instead') Future<WebViewRenderProcessAction?> androidOnRenderProcessUnresponsive(InAppWebViewController controller, Uri? url)?, @Deprecated('Use onRenderProcessResponsive instead') Future<WebViewRenderProcessAction?> androidOnRenderProcessResponsive(InAppWebViewController controller, Uri? url)?, @Deprecated('Use onRenderProcessGone instead') void androidOnRenderProcessGone(InAppWebViewController controller, RenderProcessGoneDetail detail)?, @Deprecated('Use onFormResubmission instead') Future<FormResubmissionAction?> androidOnFormResubmission(InAppWebViewController controller, Uri? url)?, @Deprecated('Use onZoomScaleChanged instead') void androidOnScaleChanged(InAppWebViewController controller, double oldScale, double newScale)?, @Deprecated('Use onJsBeforeUnload instead') Future<JsBeforeUnloadResponse?> androidOnJsBeforeUnload(InAppWebViewController controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)?, @Deprecated('Use onReceivedLoginRequest instead') void androidOnReceivedLoginRequest(InAppWebViewController controller, LoginRequest loginRequest)?, void onDidReceiveServerRedirectForProvisionalNavigation(InAppWebViewController controller)?, Future<FormResubmissionAction?> onFormResubmission(InAppWebViewController controller, WebUri? url)?, void onGeolocationPermissionsHidePrompt(InAppWebViewController controller)?, Future<GeolocationPermissionShowPromptResponse?> onGeolocationPermissionsShowPrompt(InAppWebViewController controller, String origin)?, Future<JsBeforeUnloadResponse?> onJsBeforeUnload(InAppWebViewController controller, JsBeforeUnloadRequest jsBeforeUnloadRequest)?, Future<NavigationResponseAction?> onNavigationResponse(InAppWebViewController controller, NavigationResponse navigationResponse)?, Future<PermissionResponse?> onPermissionRequest(InAppWebViewController controller, PermissionRequest permissionRequest)?, void onReceivedIcon(InAppWebViewController controller, Uint8List icon)?, 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)?, Future<WebViewRenderProcessAction?> onRenderProcessResponsive(InAppWebViewController controller, WebUri? url)?, Future<WebViewRenderProcessAction?> onRenderProcessUnresponsive(InAppWebViewController controller, WebUri? url)?, Future<SafeBrowsingResponse?> onSafeBrowsingHit(InAppWebViewController controller, WebUri url, SafeBrowsingThreat? threatType)?, void onWebContentProcessDidTerminate(InAppWebViewController controller)?, Future<ShouldAllowDeprecatedTLSAction?> shouldAllowDeprecatedTLS(InAppWebViewController controller, URLAuthenticationChallenge challenge)?, Future<WebResourceResponse?> shouldInterceptRequest(InAppWebViewController controller, WebResourceRequest request)?, Future<void> onCameraCaptureStateChanged(InAppWebViewController controller, MediaCaptureState? oldState, MediaCaptureState? newState)?, Future<void> onMicrophoneCaptureStateChanged(InAppWebViewController controller, MediaCaptureState? oldState, MediaCaptureState? newState)?, void onContentSizeChanged(InAppWebViewController controller, Size oldContentSize, Size newContentSize)?})
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}) 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