2022-10-18 18:12:33 +02:00
// GENERATED CODE - DO NOT MODIFY BY HAND
part of ' in_app_webview_settings.dart ' ;
// **************************************************************************
// ExchangeableObjectGenerator
// **************************************************************************
///This class represents all the WebView settings available.
class InAppWebViewSettings {
2022-12-03 15:58:12 +01:00
///A Boolean value indicating whether the WebView ignores an accessibility request to invert its colors.
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 11.0+ ([Official API - UIView.accessibilityIgnoresInvertColors](https://developer.apple.com/documentation/uikit/uiview/2865843-accessibilityignoresinvertcolors))
bool ? accessibilityIgnoresInvertColors ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Control whether algorithmic darkening is allowed.
All PrintJobSettings properties are optionals, All PullToRefreshSettings properties are optionals, All WebAuthenticationSessionSettings properties are optionals, Automatically infer useShouldOverrideUrlLoading, useOnLoadResource, useOnDownloadStart, useShouldInterceptAjaxRequest, useShouldInterceptFetchRequest, useShouldInterceptRequest, useOnRenderProcessGone, useOnNavigationResponse settings if their value is null and the corresponding event is implemented by the WebView (InAppWebView and HeadlessInAppWebView, not InAppBrowser) before it's native initialization
2022-11-22 22:40:45 +01:00
///
2022-12-03 15:58:12 +01:00
///WebView always sets the media query `prefers-color-scheme` according to the app's theme attribute `isLightTheme`,
///i.e. `prefers-color-scheme` is light if `isLightTheme` is `true` or not specified, otherwise it is `dark`.
///This means that the web content's light or dark style will be applied automatically to match the app's theme if the content supports it.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///Algorithmic darkening is disallowed by default.
All PrintJobSettings properties are optionals, All PullToRefreshSettings properties are optionals, All WebAuthenticationSessionSettings properties are optionals, Automatically infer useShouldOverrideUrlLoading, useOnLoadResource, useOnDownloadStart, useShouldInterceptAjaxRequest, useShouldInterceptFetchRequest, useShouldInterceptRequest, useOnRenderProcessGone, useOnNavigationResponse settings if their value is null and the corresponding event is implemented by the WebView (InAppWebView and HeadlessInAppWebView, not InAppBrowser) before it's native initialization
2022-11-22 22:40:45 +01:00
///
2022-12-03 15:58:12 +01:00
///If the app's theme is dark and it allows algorithmic darkening,
///WebView will attempt to darken web content using an algorithm,
///if the content doesn't define its own dark styles and doesn't explicitly disable darkening.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.ALGORITHMIC_DARKENING] feature is supported.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView 29+ ([Official API - WebSettingsCompat.setAlgorithmicDarkeningAllowed](https://developer.android.com/reference/androidx/webkit/WebSettingsCompat#setAlgorithmicDarkeningAllowed(android.webkit.WebSettings,boolean)))
bool ? algorithmicDarkeningAllowed ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to allow audio playing when the app goes in background or the screen is locked or another app is opened.
///However, there will be no controls in the notification bar or on the lockscreen.
///Also, make sure to not call [InAppWebViewController.pause], otherwise it will stop audio playing.
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///**IMPORTANT NOTE**: if you use this setting, your app could be rejected by the Google Play Store.
///For example, if you allow background playing of YouTube videos, which is a violation of the YouTube API Terms of Service.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
///- Android native WebView
2022-12-03 15:58:12 +01:00
bool ? allowBackgroundAudioPlaying ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Enables or disables content URL access within WebView. Content URL access allows WebView to load content from a content provider installed in the system. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setAllowContentAccess](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setAllowContentAccess(boolean)))
bool ? allowContentAccess ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Enables or disables file access within WebView. Note that this enables or disables file system access only.
///Assets and resources are still accessible using `file:///android_asset` and `file:///android_res`. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setAllowFileAccess](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setAllowFileAccess(boolean)))
bool ? allowFileAccess ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether cross-origin requests in the context of a file scheme URL should be allowed to access content from other file scheme URLs.
///Note that some accesses such as image HTML elements don't follow same-origin rules and aren't affected by this setting.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///Don't enable this setting if you open files that may be created or altered by external sources.
///Enabling this setting allows malicious scripts loaded in a `file://` context to access arbitrary local files including WebView cookies and app private data.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///Note that the value of this setting is ignored if the value of [allowUniversalAccessFromFileURLs] is `true`.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setAllowFileAccessFromFileURLs](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setAllowFileAccessFromFileURLs(boolean)))
///- iOS
///- MacOS
bool ? allowFileAccessFromFileURLs ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether cross-origin requests in the context of a file scheme URL should be allowed to access content from any origin.
///This includes access to content from other file scheme URLs or web contexts.
///Note that some access such as image HTML elements doesn't follow same-origin rules and isn't affected by this setting.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///Don't enable this setting if you open files that may be created or altered by external sources.
///Enabling this setting allows malicious scripts loaded in a `file://` context to launch cross-site scripting attacks,
///either accessing arbitrary local files including WebView cookies, app private data or even credentials used on arbitrary web sites.
All PrintJobSettings properties are optionals, All PullToRefreshSettings properties are optionals, All WebAuthenticationSessionSettings properties are optionals, Automatically infer useShouldOverrideUrlLoading, useOnLoadResource, useOnDownloadStart, useShouldInterceptAjaxRequest, useShouldInterceptFetchRequest, useShouldInterceptRequest, useOnRenderProcessGone, useOnNavigationResponse settings if their value is null and the corresponding event is implemented by the WebView (InAppWebView and HeadlessInAppWebView, not InAppBrowser) before it's native initialization
2022-11-22 22:40:45 +01:00
///
2022-12-03 15:58:12 +01:00
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setAllowUniversalAccessFromFileURLs](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setAllowUniversalAccessFromFileURLs(boolean)))
2022-10-18 18:12:33 +02:00
///- iOS
///- MacOS
2022-12-03 15:58:12 +01:00
bool ? allowUniversalAccessFromFileURLs ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Used in combination with [WebView.initialUrlRequest] or [WebView.initialData] (using the `file://` scheme), it represents the URL from which to read the web content.
///This URL must be a file-based URL (using the `file://` scheme).
///Specify the same value as the [URLRequest.url] if you are using it with the [WebView.initialUrlRequest] parameter or
///the [InAppWebViewInitialData.baseUrl] if you are using it with the [WebView.initialData] parameter to prevent WebView from reading any other content.
///Specify a directory to give WebView permission to read additional files in the specified directory.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
///- iOS
///- MacOS
2022-12-03 15:58:12 +01:00
WebUri ? allowingReadAccessTo ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to allow AirPlay. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///**Supported Platforms/Implementations**:
///- iOS ([Official API - WKWebViewConfiguration.allowsAirPlayForMediaPlayback](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1395673-allowsairplayformediaplayback))
///- MacOS ([Official API - WKWebViewConfiguration.allowsAirPlayForMediaPlayback](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1395673-allowsairplayformediaplayback))
bool ? allowsAirPlayForMediaPlayback ;
///Set to `true` to allow the horizontal swipe gestures trigger back-forward list navigations. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - WKWebView.allowsBackForwardNavigationGestures](https://developer.apple.com/documentation/webkit/wkwebview/1414995-allowsbackforwardnavigationgestu))
///- MacOS ([Official API - WKWebView.allowsBackForwardNavigationGestures](https://developer.apple.com/documentation/webkit/wkwebview/1414995-allowsbackforwardnavigationgestu))
bool ? allowsBackForwardNavigationGestures ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to allow HTML5 media playback to appear inline within the screen layout, using browser-supplied controls rather than native controls.
///For this to work, add the `webkit-playsinline` attribute to any `<video>` elements. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - WKWebViewConfiguration.allowsInlineMediaPlayback](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1614793-allowsinlinemediaplayback))
bool ? allowsInlineMediaPlayback ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to allow that pressing on a link displays a preview of the destination for the link. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - WKWebView.allowsLinkPreview](https://developer.apple.com/documentation/webkit/wkwebview/1415000-allowslinkpreview))
///- MacOS ([Official API - WKWebView.allowsLinkPreview](https://developer.apple.com/documentation/webkit/wkwebview/1415000-allowslinkpreview))
bool ? allowsLinkPreview ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to allow HTML5 videos play picture-in-picture. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - WKWebViewConfiguration.allowsPictureInPictureMediaPlayback](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1614792-allowspictureinpicturemediaplayb))
bool ? allowsPictureInPictureMediaPlayback ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A Boolean value that determines whether bouncing always occurs when horizontal scrolling reaches the end of the content view.
///If this property is set to `true` and [InAppWebViewSettings.disallowOverScroll] is `false`,
///horizontal dragging is allowed even if the content is smaller than the bounds of the scroll view.
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - UIScrollView.alwaysBounceHorizontal](https://developer.apple.com/documentation/uikit/uiscrollview/1619393-alwaysbouncehorizontal))
bool ? alwaysBounceHorizontal ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A Boolean value that determines whether bouncing always occurs when vertical scrolling reaches the end of the content.
///If this property is set to `true` and [InAppWebViewSettings.disallowOverScroll] is `false`,
///vertical dragging is allowed even if the content is smaller than the bounds of the scroll view.
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - UIScrollView.alwaysBounceVertical](https://developer.apple.com/documentation/uikit/uiscrollview/1619383-alwaysbouncevertical))
bool ? alwaysBounceVertical ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the path to the Application Caches files. In order for the Application Caches API to be enabled, this option must be set a path to which the application can write.
///This option is used one time: repeated calls are ignored.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView (Official API - WebSettings.setAppCachePath)
String ? appCachePath ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to enable Apple Pay API for the [WebView] at its first page load or on the next page load (using [InAppWebViewController.setOptions]). The default value is `false`.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///**IMPORTANT NOTE**: As written in the official [Safari 13 Release Notes](https://developer.apple.com/documentation/safari-release-notes/safari-13-release-notes#Payment-Request-API),
///it won't work if any script injection APIs are used (such as [InAppWebViewController.evaluateJavascript] or [UserScript]).
///So, when this attribute is `true`, all the methods, options, and events implemented using JavaScript won't be called or won't do anything and the result will always be `null`.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///Methods affected:
///- [InAppWebViewController.addUserScript]
///- [InAppWebViewController.addUserScripts]
///- [InAppWebViewController.removeUserScript]
///- [InAppWebViewController.removeUserScripts]
///- [InAppWebViewController.removeAllUserScripts]
///- [InAppWebViewController.evaluateJavascript]
///- [InAppWebViewController.callAsyncJavaScript]
///- [InAppWebViewController.injectJavascriptFileFromUrl]
///- [InAppWebViewController.injectJavascriptFileFromAsset]
///- [InAppWebViewController.injectCSSCode]
///- [InAppWebViewController.injectCSSFileFromUrl]
///- [InAppWebViewController.injectCSSFileFromAsset]
///- [InAppWebViewController.findAllAsync]
///- [InAppWebViewController.findNext]
///- [InAppWebViewController.clearMatches]
///- [InAppWebViewController.pauseTimers]
///- [InAppWebViewController.getSelectedText]
///- [InAppWebViewController.getHitTestResult]
///- [InAppWebViewController.requestFocusNodeHref]
///- [InAppWebViewController.requestImageRef]
///- [InAppWebViewController.postWebMessage]
///- [InAppWebViewController.createWebMessageChannel]
///- [InAppWebViewController.addWebMessageListener]
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///Also, on MacOS:
///- [InAppWebViewController.getScrollX]
///- [InAppWebViewController.getScrollY]
///- [InAppWebViewController.scrollTo]
///- [InAppWebViewController.scrollBy]
///- [InAppWebViewController.getContentHeight]
///- [InAppWebViewController.getContentWidth]
///- [InAppWebViewController.canScrollVertically]
///- [InAppWebViewController.canScrollHorizontally]
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///Settings affected:
///- [WebView.initialUserScripts]
///- [InAppWebViewSettings.supportZoom]
///- [InAppWebViewSettings.useOnLoadResource]
///- [InAppWebViewSettings.useShouldInterceptAjaxRequest]
///- [InAppWebViewSettings.useShouldInterceptFetchRequest]
///- [InAppWebViewSettings.enableViewportScale]
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///Events affected:
///- the `hitTestResult` argument of [WebView.onLongPressHitTestResult] will be empty
///- the `hitTestResult` argument of [ContextMenu.onCreateContextMenu] will be empty
///- [WebView.onLoadResource]
///- [WebView.shouldInterceptAjaxRequest]
///- [WebView.onAjaxReadyStateChange]
///- [WebView.onAjaxProgress]
///- [WebView.shouldInterceptFetchRequest]
///- [WebView.onConsoleMessage]
///- [WebView.onPrintRequest]
///- [WebView.onWindowFocus]
///- [WebView.onWindowBlur]
///- [WebView.onFindResultReceived]
///- [FindInteractionController.onFindResultReceived]
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///Also, on MacOS:
///- [WebView.onScrollChanged]
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 13.0+
2022-12-15 17:43:29 +01:00
///- MacOS 10.15+
2022-12-03 15:58:12 +01:00
bool ? applePayAPIEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Append to the existing user-agent. Setting userAgent will override this.
2022-10-22 04:05:41 +02:00
///
///**Supported Platforms/Implementations**:
///- Android native WebView
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - WKWebViewConfiguration.applicationNameForUserAgent](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1395665-applicationnameforuseragent))
///- MacOS ([Official API - WKWebViewConfiguration.applicationNameForUserAgent](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1395665-applicationnameforuseragent))
String ? applicationNameForUserAgent ;
2022-10-22 04:05:41 +02:00
2022-12-03 15:58:12 +01:00
///Configures whether the scroll indicator insets are automatically adjusted by the system.
///The default value is `false`.
2022-10-22 04:05:41 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 13.0+ ([Official API - UIScrollView.automaticallyAdjustsScrollIndicatorInsets](https://developer.apple.com/documentation/uikit/uiscrollview/3198043-automaticallyadjustsscrollindica))
bool ? automaticallyAdjustsScrollIndicatorInsets ;
2022-10-22 04:05:41 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether the WebView should not load image resources from the network (resources accessed via http and https URI schemes). The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setBlockNetworkImage](https://developer.android.com/reference/android/webkit/WebSettings#setBlockNetworkImage(boolean)))
bool ? blockNetworkImage ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether the WebView should not load resources from the network. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setBlockNetworkLoads](https://developer.android.com/reference/android/webkit/WebSettings#setBlockNetworkLoads(boolean)))
bool ? blockNetworkLoads ;
2022-10-18 18:12:33 +02:00
///Set to `true` if the WebView should use its built-in zoom mechanisms. The default value is `true`.
///
///**Supported Platforms/Implementations**:
2022-11-30 16:53:10 +01:00
///- Android native WebView ([Official API - WebSettings.setBuiltInZoomControls](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setBuiltInZoomControls(boolean)))
2022-10-18 18:12:33 +02:00
bool ? builtInZoomControls ;
2022-12-03 15:58:12 +01:00
///Sets whether WebView should use browser caching. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS
///- MacOS
bool ? cacheEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Overrides the way the cache is used. The way the cache is used is based on the navigation type. For a normal page load, the cache is checked and content is re-validated as needed.
///When navigating back, content is not revalidated, instead the content is just retrieved from the cache. The default value is [CacheMode.LOAD_DEFAULT].
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setCacheMode](https://developer.android.com/reference/android/webkit/WebSettings#setCacheMode(int)))
CacheMode ? cacheMode ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to have all the browser's cache cleared before the new WebView is opened. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS
///- MacOS
bool ? clearCache ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to have the session cookie cache cleared before the new window is opened.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
bool ? clearSessionCache ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///List of [ContentBlocker] that are a set of rules used to block content in the browser window.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS 11.0+
///- MacOS 10.13+
List < ContentBlocker > ? contentBlockers ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Configures how safe area insets are added to the adjusted content inset.
///The default value is [ScrollViewContentInsetAdjustmentBehavior.NEVER].
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 11.0+ ([Official API - UIScrollView.contentInsetAdjustmentBehavior](https://developer.apple.com/documentation/uikit/uiscrollview/2902261-contentinsetadjustmentbehavior))
ScrollViewContentInsetAdjustmentBehavior ? contentInsetAdjustmentBehavior ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the cursive font family name. The default value is `"cursive"`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setCursiveFontFamily](https://developer.android.com/reference/android/webkit/WebSettings#setCursiveFontFamily(java.lang.String)))
String ? cursiveFontFamily ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Specifying a dataDetectoryTypes value adds interactivity to web content that matches the value.
///For example, Safari adds a link to “apple.com” in the text “Visit apple.com” if the dataDetectorTypes property is set to [DataDetectorTypes.LINK].
///The default value is [DataDetectorTypes.NONE].
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 10+ ([Official API - WKWebViewConfiguration.dataDetectorTypes](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1641937-datadetectortypes))
List < DataDetectorTypes > ? dataDetectorTypes ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` if you want the database storage API is enabled. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setDatabaseEnabled](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setDatabaseEnabled(boolean)))
bool ? databaseEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A [ScrollViewDecelerationRate] value that determines the rate of deceleration after the user lifts their finger.
///The default value is [ScrollViewDecelerationRate.NORMAL].
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - UIScrollView.decelerationRate](https://developer.apple.com/documentation/uikit/uiscrollview/1619438-decelerationrate))
ScrollViewDecelerationRate ? decelerationRate ;
2022-10-18 18:12:33 +02:00
///Sets the default fixed font size. The default value is `16`.
///
///**Supported Platforms/Implementations**:
2022-11-30 16:53:10 +01:00
///- Android native WebView ([Official API - WebSettings.setDefaultFixedFontSize](https://developer.android.com/reference/android/webkit/WebSettings#setDefaultFixedFontSize(int)))
2022-10-18 18:12:33 +02:00
int ? defaultFixedFontSize ;
///Sets the default font size. The default value is `16`.
///
///**Supported Platforms/Implementations**:
2022-11-30 16:53:10 +01:00
///- Android native WebView ([Official API - WebSettings.setDefaultFontSize](https://developer.android.com/reference/android/webkit/WebSettings#setDefaultFontSize(int)))
2022-10-18 18:12:33 +02:00
int ? defaultFontSize ;
///Sets the default text encoding name to use when decoding html pages. The default value is `"UTF-8"`.
///
///**Supported Platforms/Implementations**:
2022-11-30 16:53:10 +01:00
///- Android native WebView ([Official API - WebSettings.setDefaultTextEncodingName](https://developer.android.com/reference/android/webkit/WebSettings#setDefaultTextEncodingName(java.lang.String)))
2022-10-18 18:12:33 +02:00
String ? defaultTextEncodingName ;
2022-12-03 15:58:12 +01:00
///When not playing, video elements are represented by a 'poster' image.
///The image to use can be specified by the poster attribute of the video tag in HTML.
///If the attribute is absent, then a default poster will be used.
///This property allows the WebView to provide that default image.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
Uint8List ? defaultVideoPoster ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to disable context menu. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS
///- Web but iframe requires same origin
bool ? disableContextMenu ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether the default Android WebView’ s internal error page should be suppressed or displayed for bad navigations.
///`true` means suppressed (not shown), `false` means it will be displayed. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
bool ? disableDefaultErrorPage ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to disable horizontal scroll. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS
///- Web but iframe requires same origin
bool ? disableHorizontalScroll ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to disable the [inputAccessoryView](https://developer.apple.com/documentation/uikit/uiresponder/1621119-inputaccessoryview) above system keyboard.
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS
bool ? disableInputAccessoryView ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to disable the context menu (copy, select, etc.) that is shown when the user emits a long press event on a HTML link.
///This is implemented using also JavaScript, so it must be enabled or it won't work.
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS
bool ? disableLongPressContextMenuOnLinks ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to disable vertical scroll. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS
///- Web but iframe requires same origin
bool ? disableVerticalScroll ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Disables the action mode menu items according to menuItems flag.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView 24+ ([Official API - WebSettings.setDisabledActionModeMenuItems](https://developer.android.com/reference/android/webkit/WebSettings#setDisabledActionModeMenuItems(int)))
ActionModeMenuItem ? disabledActionModeMenuItems ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to disable the bouncing of the WebView when the scrolling has reached an edge of the content. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS
bool ? disallowOverScroll ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` if the WebView should display on-screen zoom controls when using the built-in zoom mechanisms. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setDisplayZoomControls](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setDisplayZoomControls(boolean)))
bool ? displayZoomControls ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` if you want the DOM storage API is enabled. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setDomStorageEnabled](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setDomStorageEnabled(boolean)))
bool ? domStorageEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to allow a viewport meta tag to either disable or restrict the range of user scaling. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS
///- MacOS
bool ? enableViewportScale ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether EnterpriseAuthenticationAppLinkPolicy if set by admin is allowed to have any
///effect on WebView.
///
///EnterpriseAuthenticationAppLinkPolicy in WebView allows admins to specify authentication
///urls. When WebView is redirected to authentication url, and an app on the device has
///registered as the default handler for the url, that app is launched.
///
///The default value is `true`.
///
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.ENTERPRISE_AUTHENTICATION_APP_LINK_POLICY] feature is supported.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
bool ? enterpriseAuthenticationAppLinkPolicyEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the fantasy font family name. The default value is `"fantasy"`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setFantasyFontFamily](https://developer.android.com/reference/android/webkit/WebSettings#setFantasyFontFamily(java.lang.String)))
String ? fantasyFontFamily ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the fixed font family name. The default value is `"monospace"`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setFixedFontFamily](https://developer.android.com/reference/android/webkit/WebSettings#setFixedFontFamily(java.lang.String)))
String ? fixedFontFamily ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set the force dark mode for this WebView. The default value is [ForceDark.OFF].
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView 29+ ([Official API - WebSettings.setForceDark](https://developer.android.com/reference/android/webkit/WebSettings#setForceDark(int)))
ForceDark ? forceDark ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether Geolocation API is enabled. The default value is `true`.
///Set how WebView content should be darkened.
///The default value is [ForceDarkStrategy.PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING].
///
///**NOTE for Android native WebView**: it will take effect only if [WebViewFeature.isFeatureSupported] returns `true` for [WebViewFeature.FORCE_DARK_STRATEGY].
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettingsCompat.setForceDarkStrategy](https://developer.android.com/reference/androidx/webkit/WebSettingsCompat#setForceDarkStrategy(android.webkit.WebSettings,int)))
ForceDarkStrategy ? forceDarkStrategy ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether Geolocation is enabled. The default is `true`.
///
///**NOTE for Android native WebView**: Please note that in order for the Geolocation API to be usable by a page in the WebView, the following requirements must be met:
///- an application must have permission to access the device location, see [Manifest.permission.ACCESS_COARSE_LOCATION](https://developer.android.com/reference/android/Manifest.permission#ACCESS_COARSE_LOCATION), [Manifest.permission.ACCESS_FINE_LOCATION](https://developer.android.com/reference/android/Manifest.permission#ACCESS_FINE_LOCATION);
///- an application must provide an implementation of the [WebView.onGeolocationPermissionsShowPrompt] callback to receive notifications that a page is requesting access to location via the JavaScript Geolocation API.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setGeolocationEnabled](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setGeolocationEnabled(boolean)))
bool ? geolocationEnabled ;
2022-10-18 18:12:33 +02:00
///Boolean value to enable Hardware Acceleration in the WebView.
///The default value is `true`.
///
///**Supported Platforms/Implementations**:
2022-11-30 16:53:10 +01:00
///- Android native WebView ([Official API - WebView.setLayerType](https://developer.android.com/reference/android/webkit/WebView#setLayerType(int,%20android.graphics.Paint)))
2022-10-18 18:12:33 +02:00
bool ? hardwareAcceleration ;
2022-12-03 15:58:12 +01:00
///Define whether the horizontal scrollbar should be drawn or not. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///**NOTE for Web**: It must have the same value of [verticalScrollBarEnabled] to take effect.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - View.setHorizontalScrollBarEnabled](https://developer.android.com/reference/android/view/View#setHorizontalScrollBarEnabled(boolean)))
///- iOS ([Official API - UIScrollView.showsHorizontalScrollIndicator](https://developer.apple.com/documentation/uikit/uiscrollview/1619380-showshorizontalscrollindicator))
///- Web but iframe requires same origin
bool ? horizontalScrollBarEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the horizontal scrollbar thumb color.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView 29+ ([Official API - View.setHorizontalScrollbarThumbDrawable](https://developer.android.com/reference/android/view/View#setHorizontalScrollbarThumbDrawable(android.graphics.drawable.Drawable)))
Color ? horizontalScrollbarThumbColor ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the horizontal scrollbar track color.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView 29+ ([Official API - View.setHorizontalScrollbarTrackDrawable](https://developer.android.com/reference/android/view/View#setHorizontalScrollbarTrackDrawable(android.graphics.drawable.Drawable)))
Color ? horizontalScrollbarTrackColor ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Specifies a feature policy for the `<iframe>`.
///The policy defines what features are available to the `<iframe>` based on the origin of the request
///(e.g. access to the microphone, camera, battery, web-share API, etc.).
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Web ([Official API - iframe.allow](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-allow))
String ? iframeAllow ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to true if the `<iframe>` can activate fullscreen mode by calling the `requestFullscreen()` method.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Web ([Official API - iframe.allowfullscreen](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-allowfullscreen))
bool ? iframeAllowFullscreen ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A Content Security Policy enforced for the embedded resource.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Web ([Official API - iframe.csp](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-csp))
String ? iframeCsp ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A string that reflects the `name` HTML attribute, containing a name by which to refer to the frame.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Web ([Official API - iframe.name](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-name))
String ? iframeName ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A string that reflects the `referrerpolicy` HTML attribute indicating which referrer to use when fetching the linked resource.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Web ([Official API - iframe.referrerpolicy](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-referrerpolicy))
ReferrerPolicy ? iframeReferrerPolicy ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Applies extra restrictions to the content in the frame.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Web ([Official API - iframe.sandbox](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe#attr-sandbox))
Set < Sandbox > ? iframeSandbox ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` if you want that the WebView should always allow scaling of the webpage, regardless of the author's intent.
///The ignoresViewportScaleLimits property overrides the `user-scalable` HTML property in a webpage. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - WKWebViewConfiguration.ignoresViewportScaleLimits](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/2274633-ignoresviewportscalelimits))
bool ? ignoresViewportScaleLimits ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to open a browser window with incognito mode. The default value is `false`.
///
///**NOTE for Android native WebView**: setting this to `true`, it will clear all the cookies of all WebView instances,
///because there isn't any way to make the website data store non-persistent for the specific WebView instance such as on iOS.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS
///- MacOS
bool ? incognito ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the initial scale for this WebView. 0 means default. The behavior for the default scale depends on the state of [useWideViewPort] and [loadWithOverviewMode].
///If the content fits into the WebView control by width, then the zoom is set to 100%. For wide content, the behavior depends on the state of [loadWithOverviewMode].
///If its value is true, the content will be zoomed out to be fit by width into the WebView control, otherwise not.
///If initial scale is greater than 0, WebView starts with this value as initial scale.
///Please note that unlike the scale properties in the viewport meta tag, this method doesn't take the screen density into account.
///The default is `0`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebView.setInitialScale](https://developer.android.com/reference/android/webkit/WebView#setInitialScale(int)))
int ? initialScale ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A Boolean value that determines whether scrolling is disabled in a particular direction.
///If this property is `false`, scrolling is permitted in both horizontal and vertical directions.
///If this property is `true` and the user begins dragging in one general direction (horizontally or vertically),
///the scroll view disables scrolling in the other direction.
///If the drag direction is diagonal, then scrolling will not be locked and the user can drag in any direction until the drag completes.
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - UIScrollView.isDirectionalLockEnabled](https://developer.apple.com/documentation/uikit/uiscrollview/1619390-isdirectionallockenabled))
bool ? isDirectionalLockEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether fullscreen API is enabled or not.
///
///The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 15.4+ ([Official API - WKPreferences.isElementFullscreenEnabled](https://developer.apple.com/documentation/webkit/wkpreferences/3917769-iselementfullscreenenabled))
///- MacOS 12.3+ ([Official API - WKPreferences.isElementFullscreenEnabled](https://developer.apple.com/documentation/webkit/wkpreferences/3917769-iselementfullscreenenabled))
bool ? isElementFullscreenEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether the web view's built-in find interaction native UI is enabled or not.
///
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 16.0+ ([Official API - WKWebView.isFindInteractionEnabled](https://developer.apple.com/documentation/webkit/wkwebview/4002044-isfindinteractionenabled/))
bool ? isFindInteractionEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A Boolean value indicating whether warnings should be shown for suspected fraudulent content such as phishing or malware.
///According to the official documentation, this feature is currently available in the following region: China.
///The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 13.0+ ([Official API - WKPreferences.isFraudulentWebsiteWarningEnabled](https://developer.apple.com/documentation/webkit/wkpreferences/3335219-isfraudulentwebsitewarningenable))
///- MacOS 10.15+ ([Official API - WKPreferences.isFraudulentWebsiteWarningEnabled](https://developer.apple.com/documentation/webkit/wkpreferences/3335219-isfraudulentwebsitewarningenable))
bool ? isFraudulentWebsiteWarningEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-15 17:43:29 +01:00
///Controls whether this WebView is inspectable in Web Inspector.
///
///The default value is `false`.
///
///**Supported Platforms/Implementations**:
///- iOS 16.4+ ([Official API - WKWebView.isInspectable](https://developer.apple.com/documentation/webkit/wkwebview/4111163-isinspectable))
///- MacOS 13.3+ ([Official API - WKWebView.isInspectable](https://developer.apple.com/documentation/webkit/wkwebview/4111163-isinspectable))
bool ? isInspectable ;
2022-12-03 15:58:12 +01:00
///A Boolean value that determines whether paging is enabled for the scroll view.
///If the value of this property is true, the scroll view stops on multiples of the scroll view’ s bounds when the user scrolls.
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - UIScrollView.isPagingEnabled](https://developer.apple.com/documentation/uikit/uiscrollview/1619432-ispagingenabled))
bool ? isPagingEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A Boolean value indicating whether WebKit will apply built-in workarounds (quirks)
///to improve compatibility with certain known websites. You can disable site-specific quirks
///to help test your website without these workarounds. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 15.4+ ([Official API - WKPreferences.isSiteSpecificQuirksModeEnabled](https://developer.apple.com/documentation/webkit/wkpreferences/3916069-issitespecificquirksmodeenabled))
///- MacOS 12.3+ ([Official API - WKPreferences.isSiteSpecificQuirksModeEnabled](https://developer.apple.com/documentation/webkit/wkpreferences/3916069-issitespecificquirksmodeenabled))
bool ? isSiteSpecificQuirksModeEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A Boolean value indicating whether text interaction is enabled or not.
///The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-15 17:43:29 +01:00
///- iOS 15.0+ ([Official API - WKPreferences.isTextInteractionEnabled](https://developer.apple.com/documentation/webkit/wkpreferences/3727362-istextinteractionenabled))
2022-12-03 15:58:12 +01:00
///- MacOS 11.3+ ([Official API - WKPreferences.isTextInteractionEnabled](https://developer.apple.com/documentation/webkit/wkpreferences/3727362-istextinteractionenabled))
bool ? isTextInteractionEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to allow JavaScript open windows without user interaction. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setJavaScriptCanOpenWindowsAutomatically](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setJavaScriptCanOpenWindowsAutomatically(boolean)))
///- iOS ([Official API - WKPreferences.javaScriptCanOpenWindowsAutomatically](https://developer.apple.com/documentation/webkit/wkpreferences/1536573-javascriptcanopenwindowsautomati/))
///- MacOS ([Official API - WKPreferences.javaScriptCanOpenWindowsAutomatically](https://developer.apple.com/documentation/webkit/wkpreferences/1536573-javascriptcanopenwindowsautomati/))
///- Web but iframe requires same origin
bool ? javaScriptCanOpenWindowsAutomatically ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to enable JavaScript. The default value is `true`.
2022-10-31 02:09:00 +01:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setJavaScriptEnabled](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setJavaScriptEnabled(boolean)))
///- iOS ([Official API - WKWebpagePreferences.allowsContentJavaScript](https://developer.apple.com/documentation/webkit/wkwebpagepreferences/3552422-allowscontentjavascript/))
///- MacOS ([Official API - WKWebpagePreferences.allowsContentJavaScript](https://developer.apple.com/documentation/webkit/wkwebpagepreferences/3552422-allowscontentjavascript/))
///- Web
bool ? javaScriptEnabled ;
2022-10-31 02:09:00 +01:00
2022-12-03 15:58:12 +01:00
///Sets the underlying layout algorithm. This will cause a re-layout of the WebView.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setLayoutAlgorithm](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setLayoutAlgorithm(android.webkit.WebSettings.LayoutAlgorithm)))
LayoutAlgorithm ? layoutAlgorithm ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A Boolean value that indicates whether the web view limits navigation to pages within the app’ s domain.
///Check [App-Bound Domains](https://webkit.org/blog/10882/app-bound-domains/) for more details.
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 14.0+ ([Official API - WKWebViewConfiguration.limitsNavigationsToAppBoundDomains](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/3585117-limitsnavigationstoappbounddomai))
///- MacOS 11.0+ ([Official API - WKWebViewConfiguration.limitsNavigationsToAppBoundDomains](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/3585117-limitsnavigationstoappbounddomai))
bool ? limitsNavigationsToAppBoundDomains ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether the WebView loads pages in overview mode, that is, zooms out the content to fit on screen by width.
///This setting is taken into account when the content width is greater than the width of the WebView control, for example, when [useWideViewPort] is enabled.
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setLoadWithOverviewMode](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setLoadWithOverviewMode(boolean)))
bool ? loadWithOverviewMode ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether the WebView should load image resources. Note that this method controls loading of all images, including those embedded using the data URI scheme.
///Note that if the value of this setting is changed from false to true, all images resources referenced by content currently displayed by the WebView are loaded automatically.
///The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setLoadsImagesAutomatically](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setLoadsImagesAutomatically(boolean)))
bool ? loadsImagesAutomatically ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set maximum viewport inset to the largest inset a webpage may experience in your app's maximally expanded UI configuration.
///Values must be either zero or positive. It must be larger than [minimumViewportInset].
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 15.5+ ([Official API - WKWebView.setMinimumViewportInset](https://developer.apple.com/documentation/webkit/wkwebview/3974127-setminimumviewportinset/))
EdgeInsets ? maximumViewportInset ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A floating-point value that specifies the maximum scale factor that can be applied to the scroll view's content.
///This value determines how large the content can be scaled.
///It must be greater than the minimum zoom scale for zooming to be enabled.
///The default value is `1.0`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - UIScrollView.maximumZoomScale](https://developer.apple.com/documentation/uikit/uiscrollview/1619408-maximumzoomscale))
double ? maximumZoomScale ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to prevent HTML5 audio or video from autoplaying. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setMediaPlaybackRequiresUserGesture](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setMediaPlaybackRequiresUserGesture(boolean)))
///- iOS ([Official API - WKWebViewConfiguration.mediaTypesRequiringUserActionForPlayback](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1851524-mediatypesrequiringuseractionfor))
///- MacOS 10.12+ ([Official API - WKWebViewConfiguration.mediaTypesRequiringUserActionForPlayback](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1851524-mediatypesrequiringuseractionfor))
bool ? mediaPlaybackRequiresUserGesture ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///The media type for the contents of the web view.
///When the value of this property is `null`, the web view derives the current media type from the CSS media property of its content.
///If you assign a value other than `null` to this property, the web view uses the value you provide instead.
///The default value of this property is `null`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 14.0+ ([Official API - WKWebView.mediaType](https://developer.apple.com/documentation/webkit/wkwebview/3516410-mediatype))
///- MacOS 11.0+ ([Official API - WKWebView.mediaType](https://developer.apple.com/documentation/webkit/wkwebview/3516410-mediatype))
String ? mediaType ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the minimum font size. The default value is `8` for Android, `0` for iOS.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setMinimumFontSize](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setMinimumFontSize(int)))
///- iOS ([Official API - WKPreferences.minimumFontSize](https://developer.apple.com/documentation/webkit/wkpreferences/1537155-minimumfontsize/))
///- MacOS ([Official API - WKPreferences.minimumFontSize](https://developer.apple.com/documentation/webkit/wkpreferences/1537155-minimumfontsize/))
int ? minimumFontSize ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the minimum logical font size. The default is `8`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setMinimumLogicalFontSize](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setMinimumLogicalFontSize(int)))
int ? minimumLogicalFontSize ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set minimum viewport inset to the smallest inset a webpage may experience in your app's maximally collapsed UI configuration.
///Values must be either zero or positive. It must be smaller than [maximumViewportInset].
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 15.5+ ([Official API - WKWebView.setMinimumViewportInset](https://developer.apple.com/documentation/webkit/wkwebview/3974127-setminimumviewportinset/))
EdgeInsets ? minimumViewportInset ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///A floating-point value that specifies the minimum scale factor that can be applied to the scroll view's content.
///This value determines how small the content can be scaled.
///The default value is `1.0`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - UIScrollView.minimumZoomScale](https://developer.apple.com/documentation/uikit/uiscrollview/1619428-minimumzoomscale))
double ? minimumZoomScale ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Configures the WebView's behavior when a secure origin attempts to load a resource from an insecure origin.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView 21+ ([Official API - WebSettings.setMixedContentMode](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setMixedContentMode(int)))
MixedContentMode ? mixedContentMode ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Tells the WebView whether it needs to set a node. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setNeedInitialFocus](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setNeedInitialFocus(boolean)))
bool ? needInitialFocus ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Informs WebView of the network state.
///This is used to set the JavaScript property `window.navigator.isOnline` and generates the online/offline event as specified in HTML5, sec. 5.7.7.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebView.setNetworkAvailable](https://developer.android.com/reference/android/webkit/WebView#setNetworkAvailable(boolean)))
bool ? networkAvailable ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether this WebView should raster tiles when it is offscreen but attached to a window.
///Turning this on can avoid rendering artifacts when animating an offscreen WebView on-screen.
///Offscreen WebViews in this mode use more memory. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView 23+ ([Official API - WebSettings.setOffscreenPreRaster](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setOffscreenPreRaster(boolean)))
bool ? offscreenPreRaster ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the WebView's over-scroll mode.
///Setting the over-scroll mode of a WebView will have an effect only if the WebView is capable of scrolling.
///The default value is [OverScrollMode.IF_CONTENT_SCROLLS].
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - View.setOverScrollMode](https://developer.android.com/reference/android/view/View#setOverScrollMode(int)))
OverScrollMode ? overScrollMode ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///The scale factor by which the web view scales content relative to its bounds.
///The default value of this property is `1.0`, which displays the content without any scaling.
///Changing the value of this property is equivalent to setting the CSS `zoom` property on all page content.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 14.0+ ([Official API - WKWebView.pageZoom](https://developer.apple.com/documentation/webkit/wkwebview/3516411-pagezoom))
///- MacOS 11.0+ ([Official API - WKWebView.pageZoom](https://developer.apple.com/documentation/webkit/wkwebview/3516411-pagezoom))
double ? pageZoom ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the content mode that the WebView needs to use when loading and rendering a webpage. The default value is [UserPreferredContentMode.RECOMMENDED].
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS 13.0+ ([Official API - WKWebpagePreferences.preferredContentMode](https://developer.apple.com/documentation/webkit/wkwebpagepreferences/3194426-preferredcontentmode/))
///- MacOS 10.15+ ([Official API - WKWebpagePreferences.preferredContentMode](https://developer.apple.com/documentation/webkit/wkwebpagepreferences/3194426-preferredcontentmode/))
UserPreferredContentMode ? preferredContentMode ;
///Regular expression used by [WebView.shouldOverrideUrlLoading] event to cancel navigation requests for frames that are not the main frame.
///If the url request of a subframe matches the regular expression, then the request of that subframe is canceled.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
String ? regexToCancelSubFramesLoading ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the renderer priority policy for this WebView.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebView.setRendererPriorityPolicy](https://developer.android.com/reference/android/webkit/WebView#setRendererPriorityPolicy(int,%20boolean)))
RendererPriorityPolicy ? rendererPriorityPolicy ;
2022-10-18 18:12:33 +02:00
2022-12-15 17:43:29 +01:00
///Set an allow-list of origins to receive the X-Requested-With HTTP header from the WebView owning the passed [InAppWebViewSettings].
///
///Historically, this header was sent on all requests from WebView, containing the app package name of the embedding app. Depending on the version of installed WebView, this may no longer be the case, as the header was deprecated in late 2022, and its use discontinued.
///
///Apps can use this method to restore the legacy behavior for servers that still rely on the deprecated header, but it should not be used to identify the webview to first-party servers under the control of the app developer.
///
///The format of the strings in the allow-list follows the origin rules of [InAppWebViewController.addWebMessageListener].
2022-12-03 15:58:12 +01:00
///
2022-12-15 17:43:29 +01:00
///**NOTE for Android native WebView**: available on Android only if [WebViewFeature.REQUESTED_WITH_HEADER_ALLOW_LIST] feature is supported.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-15 17:43:29 +01:00
///- Android native WebView ([Official API - WebSettingsCompat.setRequestedWithHeaderOriginAllowList](https://developer.android.com/reference/androidx/webkit/WebSettingsCompat#setRequestedWithHeaderOriginAllowList(android.webkit.WebSettings,java.util.Set%3Cjava.lang.String%3E)))
Set < String > ? requestedWithHeaderOriginAllowList ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///List of custom schemes that the WebView must handle. Use the [WebView.onLoadResourceWithCustomScheme] event to intercept resource requests with custom scheme.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS 11.0+
///- MacOS 10.13+
List < String > ? resourceCustomSchemes ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether Safe Browsing is enabled. Safe Browsing allows WebView to protect against malware and phishing attacks by verifying the links.
///Safe Browsing is enabled by default for devices which support it.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView 26+ ([Official API - WebSettings.setSafeBrowsingEnabled](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setSafeBrowsingEnabled(boolean)))
bool ? safeBrowsingEnabled ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the sans-serif font family name. The default value is `"sans-serif"`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setSansSerifFontFamily](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setSansSerifFontFamily(java.lang.String)))
String ? sansSerifFontFamily ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets whether the WebView should save form data. In Android O, the platform has implemented a fully functional Autofill feature to store form data.
///Therefore, the Webview form data save feature is disabled. Note that the feature will continue to be supported on older versions of Android as before.
///The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setSaveFormData](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setSaveFormData(boolean)))
bool ? saveFormData ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Defines the delay in milliseconds that a scrollbar waits before fade out.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - View.setScrollBarDefaultDelayBeforeFade](https://developer.android.com/reference/android/view/View#setScrollBarDefaultDelayBeforeFade(int)))
int ? scrollBarDefaultDelayBeforeFade ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Defines the scrollbar fade duration in milliseconds.
All PrintJobSettings properties are optionals, All PullToRefreshSettings properties are optionals, All WebAuthenticationSessionSettings properties are optionals, Automatically infer useShouldOverrideUrlLoading, useOnLoadResource, useOnDownloadStart, useShouldInterceptAjaxRequest, useShouldInterceptFetchRequest, useShouldInterceptRequest, useOnRenderProcessGone, useOnNavigationResponse settings if their value is null and the corresponding event is implemented by the WebView (InAppWebView and HeadlessInAppWebView, not InAppBrowser) before it's native initialization
2022-11-22 22:40:45 +01:00
///
2022-12-03 15:58:12 +01:00
///**Supported Platforms/Implementations**:
///- Android native WebView ([Official API - View.setScrollBarFadeDuration](https://developer.android.com/reference/android/view/View#setScrollBarFadeDuration(int)))
int ? scrollBarFadeDuration ;
///Specifies the style of the scrollbars. The scrollbars can be overlaid or inset.
///When inset, they add to the padding of the view. And the scrollbars can be drawn inside the padding area or on the edge of the view.
///For example, if a view has a background drawable and you want to draw the scrollbars inside the padding specified by the drawable,
///you can use SCROLLBARS_INSIDE_OVERLAY or SCROLLBARS_INSIDE_INSET. If you want them to appear at the edge of the view, ignoring the padding,
///then you can use SCROLLBARS_OUTSIDE_OVERLAY or SCROLLBARS_OUTSIDE_INSET.
///The default value is [ScrollBarStyle.SCROLLBARS_INSIDE_OVERLAY].
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebView.setScrollBarStyle](https://developer.android.com/reference/android/webkit/WebView#setScrollBarStyle(int)))
ScrollBarStyle ? scrollBarStyle ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Defines whether scrollbars will fade when the view is not scrolling.
///The default value is `true`.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///**Supported Platforms/Implementations**:
///- Android native WebView ([Official API - View.setScrollbarFadingEnabled](https://developer.android.com/reference/android/view/View#setScrollbarFadingEnabled(boolean)))
bool ? scrollbarFadingEnabled ;
///A Boolean value that controls whether the scroll-to-top gesture is enabled.
///The scroll-to-top gesture is a tap on the status bar. When a user makes this gesture,
///the system asks the scroll view closest to the status bar to scroll to the top.
///The default value is `true`.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///**Supported Platforms/Implementations**:
///- iOS ([Official API - UIScrollView.scrollsToTop](https://developer.apple.com/documentation/uikit/uiscrollview/1619421-scrollstotop))
bool ? scrollsToTop ;
///The level of granularity with which the user can interactively select content in the web view.
///The default value is [SelectionGranularity.DYNAMIC].
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///**Supported Platforms/Implementations**:
///- iOS ([Official API - WKWebViewConfiguration.selectionGranularity](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1614756-selectiongranularity))
SelectionGranularity ? selectionGranularity ;
///Sets the serif font family name. The default value is `"sans-serif"`.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///**Supported Platforms/Implementations**:
///- Android native WebView ([Official API - WebSettings.setSerifFontFamily](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setSerifFontFamily(java.lang.String)))
String ? serifFontFamily ;
///Set `true` if shared cookies from `HTTPCookieStorage.shared` should used for every load request in the WebView.
///The default value is `false`.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///**Supported Platforms/Implementations**:
///- iOS 11.0+
///- MacOS 10.13+
bool ? sharedCookiesEnabled ;
2022-12-15 17:43:29 +01:00
///A Boolean value that indicates whether to include any background color or graphics when printing content.
///
///The default value is `false`.
///
///**Supported Platforms/Implementations**:
///- iOS 16.4+ ([Official API - WKWebView.shouldPrintBackgrounds](https://developer.apple.com/documentation/webkit/wkpreferences/4104043-shouldprintbackgrounds))
///- MacOS 13.3+ ([Official API - WKWebView.shouldPrintBackgrounds](https://developer.apple.com/documentation/webkit/wkpreferences/4104043-shouldprintbackgrounds))
bool ? shouldPrintBackgrounds ;
2022-12-03 15:58:12 +01:00
///Sets the standard font family name. The default value is `"sans-serif"`.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///**Supported Platforms/Implementations**:
///- Android native WebView ([Official API - WebSettings.setStandardFontFamily](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setStandardFontFamily(java.lang.String)))
String ? standardFontFamily ;
///Sets whether the WebView supports multiple windows.
///If set to `true`, [WebView.onCreateWindow] event must be implemented by the host application. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setSupportMultipleWindows](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setSupportMultipleWindows(boolean)))
bool ? supportMultipleWindows ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `false` if the WebView should not support zooming using its on-screen zoom controls and gestures. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setSupportZoom](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setSupportZoom(boolean)))
2022-10-18 18:12:33 +02:00
///- iOS
///- MacOS
2022-12-03 15:58:12 +01:00
bool ? supportZoom ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` if you want the WebView suppresses content rendering until it is fully loaded into memory. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS ([Official API - WKWebViewConfiguration.suppressesIncrementalRendering](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1395663-suppressesincrementalrendering))
///- MacOS ([Official API - WKWebViewConfiguration.suppressesIncrementalRendering](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/1395663-suppressesincrementalrendering))
bool ? suppressesIncrementalRendering ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the text zoom of the page in percent. The default value is `100`.
///
///**Supported Platforms/Implementations**:
///- Android native WebView ([Official API - WebSettings.setTextZoom](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setTextZoom(int)))
int ? textZoom ;
///Boolean value to enable third party cookies in the WebView.
///Used on Android Lollipop and above only as third party cookies are enabled by default on Android Kitkat and below and on iOS.
///The default value is `true`.
///
///**Supported Platforms/Implementations**:
///- Android native WebView 21+ ([Official API - CookieManager.setAcceptThirdPartyCookies](https://developer.android.com/reference/android/webkit/CookieManager#setAcceptThirdPartyCookies(android.webkit.WebView,%20boolean)))
bool ? thirdPartyCookiesEnabled ;
///Set to `true` to make the background of the WebView transparent. If your app has a dark theme, this can prevent a white flash on initialization. The default value is `false`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
2022-10-18 18:12:33 +02:00
///- iOS
2022-12-03 15:58:12 +01:00
///- MacOS 12.0+
bool ? transparentBackground ;
2022-10-18 18:12:33 +02:00
///The color the web view displays behind the active page, visible when the user scrolls beyond the bounds of the page.
///
///The web view derives the default value of this property from the content of the page,
///using the background colors of the `<html>` and `<body>` elements with the background color of the web view.
///To override the default color, set this property to a new color.
///
///**Supported Platforms/Implementations**:
2022-11-30 16:53:10 +01:00
///- iOS 15.0+ ([Official API - WKWebView.underPageBackgroundColor](https://developer.apple.com/documentation/webkit/wkwebview/3850574-underpagebackgroundcolor))
///- MacOS 12.0+ ([Official API - WKWebView.underPageBackgroundColor](https://developer.apple.com/documentation/webkit/wkwebview/3850574-underpagebackgroundcolor))
2022-10-18 18:12:33 +02:00
Color ? underPageBackgroundColor ;
2022-12-03 15:58:12 +01:00
///A Boolean value indicating whether HTTP requests to servers known to support HTTPS should be automatically upgraded to HTTPS requests.
2022-10-18 18:12:33 +02:00
///The default value is `true`.
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS 15.0+ ([Official API - WKWebViewConfiguration.upgradeKnownHostsToHTTPS](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/3752243-upgradeknownhoststohttps))
///- MacOS 11.3+ ([Official API - WKWebViewConfiguration.upgradeKnownHostsToHTTPS](https://developer.apple.com/documentation/webkit/wkwebviewconfiguration/3752243-upgradeknownhoststohttps))
bool ? upgradeKnownHostsToHTTPS ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `false` to disable Flutter Hybrid Composition. The default value is `true`.
///Hybrid Composition is supported starting with Flutter v1.20+.
///
///**NOTE for Android native WebView**: It is recommended to use Hybrid Composition only on Android 10+ for a release app,
///as it can cause framerate drops on animations in Android 9 and lower (see [Hybrid-Composition#performance](https://github.com/flutter/flutter/wiki/Hybrid-Composition#performance)).
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
bool ? useHybridComposition ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to be able to listen at the [WebView.onDownloadStartRequest] event.
///
///If the [WebView.onDownloadStartRequest] event is implemented and this value is `null`,
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
///This logic will not be applied for [InAppBrowser], where you must set the value manually.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS
///- MacOS
bool ? useOnDownloadStart ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to be able to listen at the [WebView.onLoadResource] event.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///If the [WebView.onLoadResource] event is implemented and this value is `null`,
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
///This logic will not be applied for [InAppBrowser], where you must set the value manually.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS
///- MacOS
bool ? useOnLoadResource ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to be able to listen to the [WebView.onNavigationResponse] event.
2022-10-18 18:12:33 +02:00
///
2022-12-03 15:58:12 +01:00
///If the [WebView.onNavigationResponse] event is implemented and this value is `null`,
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
///This logic will not be applied for [InAppBrowser], where you must set the value manually.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- iOS
///- MacOS
bool ? useOnNavigationResponse ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to be able to listen at the [WebView.onRenderProcessGone] event.
///
///If the [WebView.onRenderProcessGone] event is implemented and this value is `null`,
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
///This logic will not be applied for [InAppBrowser], where you must set the value manually.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
bool ? useOnRenderProcessGone ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to be able to listen at the [WebView.shouldInterceptAjaxRequest] event.
///
///If the [WebView.shouldInterceptAjaxRequest] event is implemented and this value is `null`,
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
///This logic will not be applied for [InAppBrowser], where you must set the value manually.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS
///- MacOS
bool ? useShouldInterceptAjaxRequest ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to be able to listen at the [WebView.shouldInterceptFetchRequest] event.
///
///If the [WebView.shouldInterceptFetchRequest] event is implemented and this value is `null`,
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
///This logic will not be applied for [InAppBrowser], where you must set the value manually.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS
///- MacOS
bool ? useShouldInterceptFetchRequest ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to be able to listen at the [WebView.shouldInterceptRequest] event.
///
///If the [WebView.shouldInterceptRequest] event is implemented and this value is `null`,
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
///This logic will not be applied for [InAppBrowser], where you must set the value manually.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
bool ? useShouldInterceptRequest ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` to be able to listen at the [WebView.shouldOverrideUrlLoading] event.
///
///If the [WebView.shouldOverrideUrlLoading] event is implemented and this value is `null`,
///it will be automatically inferred as `true`, otherwise, the default value is `false`.
///This logic will not be applied for [InAppBrowser], where you must set the value manually.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView
///- iOS
///- MacOS
bool ? useShouldOverrideUrlLoading ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Set to `true` if the WebView should enable support for the "viewport" HTML meta tag or should use a wide viewport.
///When the value of the setting is false, the layout width is always set to the width of the WebView control in device-independent (CSS) pixels.
///When the value is true and the page contains the viewport meta tag, the value of the width specified in the tag is used.
///If the page does not contain the tag or does not provide a width, then a wide viewport will be used. The default value is `true`.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setUseWideViewPort](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setUseWideViewPort(boolean)))
bool ? useWideViewPort ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Sets the user-agent for the WebView.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - WebSettings.setUserAgentString](https://developer.android.com/reference/android/webkit/WebSettings?hl=en#setUserAgentString(java.lang.String)))
///- iOS ([Official API - WKWebView.customUserAgent](https://developer.apple.com/documentation/webkit/wkwebview/1414950-customuseragent))
///- MacOS ([Official API - WKWebView.customUserAgent](https://developer.apple.com/documentation/webkit/wkwebview/1414950-customuseragent))
String ? userAgent ;
2022-10-18 18:12:33 +02:00
2022-12-03 15:58:12 +01:00
///Define whether the vertical scrollbar should be drawn or not. The default value is `true`.
///
///**NOTE for Web**: It must have the same value of [horizontalScrollBarEnabled] to take effect.
2022-10-18 18:12:33 +02:00
///
///**Supported Platforms/Implementations**:
2022-12-03 15:58:12 +01:00
///- Android native WebView ([Official API - View.setVerticalScrollBarEnabled](https://developer.android.com/reference/android/view/View#setVerticalScrollBarEnabled(boolean)))
///- iOS ([Official API - UIScrollView.showsVerticalScrollIndicator](https://developer.apple.com/documentation/uikit/uiscrollview/1619405-showsverticalscrollindicator/))
///- Web but iframe requires same origin
bool ? verticalScrollBarEnabled ;
///Sets the position of the vertical scroll bar.
///The default value is [VerticalScrollbarPosition.SCROLLBAR_POSITION_DEFAULT].
///
///**Supported Platforms/Implementations**:
///- Android native WebView ([Official API - View.setVerticalScrollbarPosition](https://developer.android.com/reference/android/view/View#setVerticalScrollbarPosition(int)))
VerticalScrollbarPosition ? verticalScrollbarPosition ;
///Sets the vertical scrollbar thumb color.
///
///**Supported Platforms/Implementations**:
///- Android native WebView 29+ ([Official API - View.setVerticalScrollbarThumbDrawable](https://developer.android.com/reference/android/view/View#setVerticalScrollbarThumbDrawable(android.graphics.drawable.Drawable)))
Color ? verticalScrollbarThumbColor ;
///Sets the vertical scrollbar track color.
///
///**Supported Platforms/Implementations**:
///- Android native WebView 29+ ([Official API - View.setVerticalScrollbarTrackDrawable](https://developer.android.com/reference/android/view/View#setVerticalScrollbarTrackDrawable(android.graphics.drawable.Drawable)))
Color ? verticalScrollbarTrackColor ;
///Use a [WebViewAssetLoader] instance to load local files including application's static assets and resources using http(s):// URLs.
///Loading local files using web-like URLs instead of `file://` is desirable as it is compatible with the Same-Origin policy.
///
///**Supported Platforms/Implementations**:
///- Android native WebView
WebViewAssetLoader ? webViewAssetLoader ;
2022-10-18 18:12:33 +02:00
InAppWebViewSettings (
All PrintJobSettings properties are optionals, All PullToRefreshSettings properties are optionals, All WebAuthenticationSessionSettings properties are optionals, Automatically infer useShouldOverrideUrlLoading, useOnLoadResource, useOnDownloadStart, useShouldInterceptAjaxRequest, useShouldInterceptFetchRequest, useShouldInterceptRequest, useOnRenderProcessGone, useOnNavigationResponse settings if their value is null and the corresponding event is implemented by the WebView (InAppWebView and HeadlessInAppWebView, not InAppBrowser) before it's native initialization
2022-11-22 22:40:45 +01:00
{ this . useShouldOverrideUrlLoading ,
this . useOnLoadResource ,
this . useOnDownloadStart ,
2022-10-18 18:12:33 +02:00
this . clearCache = false ,
this . userAgent = " " ,
this . applicationNameForUserAgent = " " ,
this . javaScriptEnabled = true ,
this . javaScriptCanOpenWindowsAutomatically = false ,
this . mediaPlaybackRequiresUserGesture = true ,
this . minimumFontSize ,
this . verticalScrollBarEnabled = true ,
this . horizontalScrollBarEnabled = true ,
this . resourceCustomSchemes = const [ ] ,
this . contentBlockers = const [ ] ,
this . preferredContentMode = UserPreferredContentMode . RECOMMENDED ,
All PrintJobSettings properties are optionals, All PullToRefreshSettings properties are optionals, All WebAuthenticationSessionSettings properties are optionals, Automatically infer useShouldOverrideUrlLoading, useOnLoadResource, useOnDownloadStart, useShouldInterceptAjaxRequest, useShouldInterceptFetchRequest, useShouldInterceptRequest, useOnRenderProcessGone, useOnNavigationResponse settings if their value is null and the corresponding event is implemented by the WebView (InAppWebView and HeadlessInAppWebView, not InAppBrowser) before it's native initialization
2022-11-22 22:40:45 +01:00
this . useShouldInterceptAjaxRequest ,
this . useShouldInterceptFetchRequest ,
2022-10-18 18:12:33 +02:00
this . incognito = false ,
this . cacheEnabled = true ,
this . transparentBackground = false ,
this . disableVerticalScroll = false ,
this . disableHorizontalScroll = false ,
this . disableContextMenu = false ,
this . supportZoom = true ,
this . allowFileAccessFromFileURLs = false ,
this . allowUniversalAccessFromFileURLs = false ,
this . textZoom = 100 ,
this . clearSessionCache = false ,
this . builtInZoomControls = true ,
this . displayZoomControls = false ,
this . databaseEnabled = true ,
this . domStorageEnabled = true ,
this . useWideViewPort = true ,
this . safeBrowsingEnabled = true ,
this . mixedContentMode ,
this . allowContentAccess = true ,
this . allowFileAccess = true ,
this . appCachePath ,
this . blockNetworkImage = false ,
this . blockNetworkLoads = false ,
this . cacheMode = CacheMode . LOAD_DEFAULT ,
this . cursiveFontFamily = " cursive " ,
this . defaultFixedFontSize = 16 ,
this . defaultFontSize = 16 ,
this . defaultTextEncodingName = " UTF-8 " ,
this . disabledActionModeMenuItems ,
this . fantasyFontFamily = " fantasy " ,
this . fixedFontFamily = " monospace " ,
this . forceDark = ForceDark . OFF ,
this . forceDarkStrategy =
ForceDarkStrategy . PREFER_WEB_THEME_OVER_USER_AGENT_DARKENING ,
this . geolocationEnabled = true ,
this . layoutAlgorithm ,
this . loadWithOverviewMode = true ,
this . loadsImagesAutomatically = true ,
this . minimumLogicalFontSize = 8 ,
this . needInitialFocus = true ,
this . offscreenPreRaster = false ,
this . sansSerifFontFamily = " sans-serif " ,
this . serifFontFamily = " sans-serif " ,
this . standardFontFamily = " sans-serif " ,
this . saveFormData = true ,
this . thirdPartyCookiesEnabled = true ,
this . hardwareAcceleration = true ,
2022-10-22 04:05:41 +02:00
this . initialScale = 0 ,
2022-10-18 18:12:33 +02:00
this . supportMultipleWindows = false ,
this . regexToCancelSubFramesLoading ,
this . useHybridComposition = true ,
All PrintJobSettings properties are optionals, All PullToRefreshSettings properties are optionals, All WebAuthenticationSessionSettings properties are optionals, Automatically infer useShouldOverrideUrlLoading, useOnLoadResource, useOnDownloadStart, useShouldInterceptAjaxRequest, useShouldInterceptFetchRequest, useShouldInterceptRequest, useOnRenderProcessGone, useOnNavigationResponse settings if their value is null and the corresponding event is implemented by the WebView (InAppWebView and HeadlessInAppWebView, not InAppBrowser) before it's native initialization
2022-11-22 22:40:45 +01:00
this . useShouldInterceptRequest ,
this . useOnRenderProcessGone ,
2022-10-18 18:12:33 +02:00
this . overScrollMode = OverScrollMode . IF_CONTENT_SCROLLS ,
this . networkAvailable ,
this . scrollBarStyle = ScrollBarStyle . SCROLLBARS_INSIDE_OVERLAY ,
this . verticalScrollbarPosition =
VerticalScrollbarPosition . SCROLLBAR_POSITION_DEFAULT ,
this . scrollBarDefaultDelayBeforeFade ,
this . scrollbarFadingEnabled = true ,
this . scrollBarFadeDuration ,
this . rendererPriorityPolicy ,
this . disableDefaultErrorPage = false ,
this . verticalScrollbarThumbColor ,
this . verticalScrollbarTrackColor ,
this . horizontalScrollbarThumbColor ,
this . horizontalScrollbarTrackColor ,
this . algorithmicDarkeningAllowed = false ,
this . enterpriseAuthenticationAppLinkPolicyEnabled = true ,
2022-10-31 02:09:00 +01:00
this . defaultVideoPoster ,
2022-12-15 17:43:29 +01:00
this . requestedWithHeaderOriginAllowList ,
2022-10-18 18:12:33 +02:00
this . disallowOverScroll = false ,
this . enableViewportScale = false ,
this . suppressesIncrementalRendering = false ,
this . allowsAirPlayForMediaPlayback = true ,
this . allowsBackForwardNavigationGestures = true ,
this . allowsLinkPreview = true ,
this . ignoresViewportScaleLimits = false ,
this . allowsInlineMediaPlayback = false ,
this . allowsPictureInPictureMediaPlayback = true ,
this . isFraudulentWebsiteWarningEnabled = true ,
this . selectionGranularity = SelectionGranularity . DYNAMIC ,
this . dataDetectorTypes = const [ DataDetectorTypes . NONE ] ,
this . sharedCookiesEnabled = false ,
this . automaticallyAdjustsScrollIndicatorInsets = false ,
this . accessibilityIgnoresInvertColors = false ,
this . decelerationRate = ScrollViewDecelerationRate . NORMAL ,
this . alwaysBounceVertical = false ,
this . alwaysBounceHorizontal = false ,
this . scrollsToTop = true ,
this . isPagingEnabled = false ,
this . maximumZoomScale = 1.0 ,
this . minimumZoomScale = 1.0 ,
this . contentInsetAdjustmentBehavior =
ScrollViewContentInsetAdjustmentBehavior . NEVER ,
this . isDirectionalLockEnabled = false ,
this . mediaType ,
this . pageZoom = 1.0 ,
this . limitsNavigationsToAppBoundDomains = false ,
All PrintJobSettings properties are optionals, All PullToRefreshSettings properties are optionals, All WebAuthenticationSessionSettings properties are optionals, Automatically infer useShouldOverrideUrlLoading, useOnLoadResource, useOnDownloadStart, useShouldInterceptAjaxRequest, useShouldInterceptFetchRequest, useShouldInterceptRequest, useOnRenderProcessGone, useOnNavigationResponse settings if their value is null and the corresponding event is implemented by the WebView (InAppWebView and HeadlessInAppWebView, not InAppBrowser) before it's native initialization
2022-11-22 22:40:45 +01:00
this . useOnNavigationResponse ,
2022-10-18 18:12:33 +02:00
this . applePayAPIEnabled = false ,
this . allowingReadAccessTo ,
this . disableLongPressContextMenuOnLinks = false ,
this . disableInputAccessoryView = false ,
this . underPageBackgroundColor ,
this . isTextInteractionEnabled = true ,
this . isSiteSpecificQuirksModeEnabled = true ,
this . upgradeKnownHostsToHTTPS = true ,
this . isElementFullscreenEnabled = true ,
this . isFindInteractionEnabled = false ,
this . minimumViewportInset ,
this . maximumViewportInset ,
2022-12-15 17:43:29 +01:00
this . isInspectable = false ,
this . shouldPrintBackgrounds = false ,
2022-10-22 04:05:41 +02:00
this . allowBackgroundAudioPlaying = false ,
this . webViewAssetLoader ,
2022-10-18 18:12:33 +02:00
this . iframeAllow ,
this . iframeAllowFullscreen ,
this . iframeSandbox ,
this . iframeReferrerPolicy ,
this . iframeName ,
2022-10-22 04:05:41 +02:00
this . iframeCsp } ) {
if ( this . minimumFontSize = = null )
2022-11-30 16:53:10 +01:00
this . minimumFontSize = Util . isAndroid ? 8 : 0 ;
2022-10-22 04:05:41 +02:00
assert ( this . resourceCustomSchemes = = null | |
( this . resourceCustomSchemes ! = null & &
! this . resourceCustomSchemes ! . contains ( " http " ) & &
! this . resourceCustomSchemes ! . contains ( " https " ) ) ) ;
assert (
allowingReadAccessTo = = null | | allowingReadAccessTo ! . isScheme ( " file " ) ) ;
assert (
( minimumViewportInset = = null & & maximumViewportInset = = null ) | |
minimumViewportInset ! = null & &
maximumViewportInset ! = null & &
minimumViewportInset ! . isNonNegative & &
maximumViewportInset ! . isNonNegative & &
minimumViewportInset ! . vertical < =
maximumViewportInset ! . vertical & &
minimumViewportInset ! . horizontal < =
maximumViewportInset ! . horizontal ,
" minimumViewportInset cannot be larger than maximumViewportInset " ) ;
}
2022-10-18 18:12:33 +02:00
///Gets a possible [InAppWebViewSettings] instance from a [Map] value.
static InAppWebViewSettings ? fromMap ( Map < String , dynamic > ? map ) {
if ( map = = null ) {
return null ;
}
final instance = InAppWebViewSettings (
2022-12-03 15:58:12 +01:00
allowingReadAccessTo: map [ ' allowingReadAccessTo ' ] ! = null
? WebUri ( map [ ' allowingReadAccessTo ' ] )
: null ,
2022-10-18 18:12:33 +02:00
appCachePath: map [ ' appCachePath ' ] ,
2022-12-03 15:58:12 +01:00
defaultVideoPoster: map [ ' defaultVideoPoster ' ] ,
2022-10-18 18:12:33 +02:00
disabledActionModeMenuItems: ActionModeMenuItem . fromNativeValue (
map [ ' disabledActionModeMenuItems ' ] ) ,
horizontalScrollbarThumbColor:
map [ ' horizontalScrollbarThumbColor ' ] ! = null
? UtilColor . fromStringRepresentation (
map [ ' horizontalScrollbarThumbColor ' ] )
: null ,
horizontalScrollbarTrackColor:
map [ ' horizontalScrollbarTrackColor ' ] ! = null
? UtilColor . fromStringRepresentation (
map [ ' horizontalScrollbarTrackColor ' ] )
: null ,
iframeAllow: map [ ' iframeAllow ' ] ,
iframeAllowFullscreen: map [ ' iframeAllowFullscreen ' ] ,
2022-12-03 15:58:12 +01:00
iframeCsp: map [ ' iframeCsp ' ] ,
iframeName: map [ ' iframeName ' ] ,
iframeReferrerPolicy:
ReferrerPolicy . fromNativeValue ( map [ ' iframeReferrerPolicy ' ] ) ,
2022-10-18 18:12:33 +02:00
iframeSandbox: map [ ' iframeSandbox ' ] ! = null
? Set < Sandbox > . from (
map [ ' iframeSandbox ' ] . map ( ( e ) = > Sandbox . fromNativeValue ( e ) ! ) )
: null ,
2022-12-03 15:58:12 +01:00
layoutAlgorithm: LayoutAlgorithm . fromNativeValue ( map [ ' layoutAlgorithm ' ] ) ,
maximumViewportInset: MapEdgeInsets . fromMap (
map [ ' maximumViewportInset ' ] ? . cast < String , dynamic > ( ) ) ,
mediaType: map [ ' mediaType ' ] ,
minimumFontSize: map [ ' minimumFontSize ' ] ,
minimumViewportInset: MapEdgeInsets . fromMap (
map [ ' minimumViewportInset ' ] ? . cast < String , dynamic > ( ) ) ,
mixedContentMode:
MixedContentMode . fromNativeValue ( map [ ' mixedContentMode ' ] ) ,
networkAvailable: map [ ' networkAvailable ' ] ,
regexToCancelSubFramesLoading: map [ ' regexToCancelSubFramesLoading ' ] ,
rendererPriorityPolicy: RendererPriorityPolicy . fromMap (
map [ ' rendererPriorityPolicy ' ] ? . cast < String , dynamic > ( ) ) ,
2022-12-15 17:43:29 +01:00
requestedWithHeaderOriginAllowList:
map [ ' requestedWithHeaderOriginAllowList ' ] ! = null
? Set < String > . from (
map [ ' requestedWithHeaderOriginAllowList ' ] ! . cast < String > ( ) )
: null ,
2022-12-03 15:58:12 +01:00
scrollBarDefaultDelayBeforeFade: map [ ' scrollBarDefaultDelayBeforeFade ' ] ,
scrollBarFadeDuration: map [ ' scrollBarFadeDuration ' ] ,
underPageBackgroundColor: map [ ' underPageBackgroundColor ' ] ! = null
? UtilColor . fromStringRepresentation ( map [ ' underPageBackgroundColor ' ] )
: null ,
useOnDownloadStart: map [ ' useOnDownloadStart ' ] ,
useOnLoadResource: map [ ' useOnLoadResource ' ] ,
useOnNavigationResponse: map [ ' useOnNavigationResponse ' ] ,
useOnRenderProcessGone: map [ ' useOnRenderProcessGone ' ] ,
useShouldInterceptAjaxRequest: map [ ' useShouldInterceptAjaxRequest ' ] ,
useShouldInterceptFetchRequest: map [ ' useShouldInterceptFetchRequest ' ] ,
useShouldInterceptRequest: map [ ' useShouldInterceptRequest ' ] ,
useShouldOverrideUrlLoading: map [ ' useShouldOverrideUrlLoading ' ] ,
verticalScrollbarThumbColor: map [ ' verticalScrollbarThumbColor ' ] ! = null
? UtilColor . fromStringRepresentation (
map [ ' verticalScrollbarThumbColor ' ] )
: null ,
verticalScrollbarTrackColor: map [ ' verticalScrollbarTrackColor ' ] ! = null
? UtilColor . fromStringRepresentation (
map [ ' verticalScrollbarTrackColor ' ] )
: null ,
webViewAssetLoader: WebViewAssetLoader . fromMap (
map [ ' webViewAssetLoader ' ] ? . cast < String , dynamic > ( ) ) ,
2022-10-18 18:12:33 +02:00
) ;
2022-12-03 15:58:12 +01:00
instance . accessibilityIgnoresInvertColors =
map [ ' accessibilityIgnoresInvertColors ' ] ;
instance . algorithmicDarkeningAllowed = map [ ' algorithmicDarkeningAllowed ' ] ;
2022-10-22 04:05:41 +02:00
instance . allowBackgroundAudioPlaying = map [ ' allowBackgroundAudioPlaying ' ] ;
2022-10-18 18:12:33 +02:00
instance . allowContentAccess = map [ ' allowContentAccess ' ] ;
instance . allowFileAccess = map [ ' allowFileAccess ' ] ;
2022-12-03 15:58:12 +01:00
instance . allowFileAccessFromFileURLs = map [ ' allowFileAccessFromFileURLs ' ] ;
instance . allowUniversalAccessFromFileURLs =
map [ ' allowUniversalAccessFromFileURLs ' ] ;
instance . allowsAirPlayForMediaPlayback =
map [ ' allowsAirPlayForMediaPlayback ' ] ;
instance . allowsBackForwardNavigationGestures =
map [ ' allowsBackForwardNavigationGestures ' ] ;
instance . allowsInlineMediaPlayback = map [ ' allowsInlineMediaPlayback ' ] ;
instance . allowsLinkPreview = map [ ' allowsLinkPreview ' ] ;
instance . allowsPictureInPictureMediaPlayback =
map [ ' allowsPictureInPictureMediaPlayback ' ] ;
instance . alwaysBounceHorizontal = map [ ' alwaysBounceHorizontal ' ] ;
instance . alwaysBounceVertical = map [ ' alwaysBounceVertical ' ] ;
instance . applePayAPIEnabled = map [ ' applePayAPIEnabled ' ] ;
instance . applicationNameForUserAgent = map [ ' applicationNameForUserAgent ' ] ;
instance . automaticallyAdjustsScrollIndicatorInsets =
map [ ' automaticallyAdjustsScrollIndicatorInsets ' ] ;
2022-10-18 18:12:33 +02:00
instance . blockNetworkImage = map [ ' blockNetworkImage ' ] ;
instance . blockNetworkLoads = map [ ' blockNetworkLoads ' ] ;
2022-12-03 15:58:12 +01:00
instance . builtInZoomControls = map [ ' builtInZoomControls ' ] ;
instance . cacheEnabled = map [ ' cacheEnabled ' ] ;
2022-10-18 18:12:33 +02:00
instance . cacheMode = CacheMode . fromNativeValue ( map [ ' cacheMode ' ] ) ;
2022-12-03 15:58:12 +01:00
instance . clearCache = map [ ' clearCache ' ] ;
instance . clearSessionCache = map [ ' clearSessionCache ' ] ;
instance . contentBlockers =
_deserializeContentBlockers ( map [ ' contentBlockers ' ] ) ;
instance . contentInsetAdjustmentBehavior =
ScrollViewContentInsetAdjustmentBehavior . fromNativeValue (
map [ ' contentInsetAdjustmentBehavior ' ] ) ;
2022-10-18 18:12:33 +02:00
instance . cursiveFontFamily = map [ ' cursiveFontFamily ' ] ;
2022-12-03 15:58:12 +01:00
instance . dataDetectorTypes = map [ ' dataDetectorTypes ' ] ! = null
? List < DataDetectorTypes > . from ( map [ ' dataDetectorTypes ' ]
. map ( ( e ) = > DataDetectorTypes . fromNativeValue ( e ) ! ) )
: null ;
instance . databaseEnabled = map [ ' databaseEnabled ' ] ;
instance . decelerationRate =
ScrollViewDecelerationRate . fromNativeValue ( map [ ' decelerationRate ' ] ) ;
2022-10-18 18:12:33 +02:00
instance . defaultFixedFontSize = map [ ' defaultFixedFontSize ' ] ;
instance . defaultFontSize = map [ ' defaultFontSize ' ] ;
instance . defaultTextEncodingName = map [ ' defaultTextEncodingName ' ] ;
2022-12-03 15:58:12 +01:00
instance . disableContextMenu = map [ ' disableContextMenu ' ] ;
instance . disableDefaultErrorPage = map [ ' disableDefaultErrorPage ' ] ;
instance . disableHorizontalScroll = map [ ' disableHorizontalScroll ' ] ;
instance . disableInputAccessoryView = map [ ' disableInputAccessoryView ' ] ;
instance . disableLongPressContextMenuOnLinks =
map [ ' disableLongPressContextMenuOnLinks ' ] ;
instance . disableVerticalScroll = map [ ' disableVerticalScroll ' ] ;
instance . disallowOverScroll = map [ ' disallowOverScroll ' ] ;
instance . displayZoomControls = map [ ' displayZoomControls ' ] ;
instance . domStorageEnabled = map [ ' domStorageEnabled ' ] ;
instance . enableViewportScale = map [ ' enableViewportScale ' ] ;
instance . enterpriseAuthenticationAppLinkPolicyEnabled =
map [ ' enterpriseAuthenticationAppLinkPolicyEnabled ' ] ;
2022-10-18 18:12:33 +02:00
instance . fantasyFontFamily = map [ ' fantasyFontFamily ' ] ;
instance . fixedFontFamily = map [ ' fixedFontFamily ' ] ;
instance . forceDark = ForceDark . fromNativeValue ( map [ ' forceDark ' ] ) ;
instance . forceDarkStrategy =
ForceDarkStrategy . fromNativeValue ( map [ ' forceDarkStrategy ' ] ) ;
instance . geolocationEnabled = map [ ' geolocationEnabled ' ] ;
2022-12-03 15:58:12 +01:00
instance . hardwareAcceleration = map [ ' hardwareAcceleration ' ] ;
instance . horizontalScrollBarEnabled = map [ ' horizontalScrollBarEnabled ' ] ;
instance . ignoresViewportScaleLimits = map [ ' ignoresViewportScaleLimits ' ] ;
instance . incognito = map [ ' incognito ' ] ;
instance . initialScale = map [ ' initialScale ' ] ;
instance . isDirectionalLockEnabled = map [ ' isDirectionalLockEnabled ' ] ;
instance . isElementFullscreenEnabled = map [ ' isElementFullscreenEnabled ' ] ;
instance . isFindInteractionEnabled = map [ ' isFindInteractionEnabled ' ] ;
instance . isFraudulentWebsiteWarningEnabled =
map [ ' isFraudulentWebsiteWarningEnabled ' ] ;
2022-12-15 17:43:29 +01:00
instance . isInspectable = map [ ' isInspectable ' ] ;
2022-12-03 15:58:12 +01:00
instance . isPagingEnabled = map [ ' isPagingEnabled ' ] ;
instance . isSiteSpecificQuirksModeEnabled =
map [ ' isSiteSpecificQuirksModeEnabled ' ] ;
instance . isTextInteractionEnabled = map [ ' isTextInteractionEnabled ' ] ;
instance . javaScriptCanOpenWindowsAutomatically =
map [ ' javaScriptCanOpenWindowsAutomatically ' ] ;
instance . javaScriptEnabled = map [ ' javaScriptEnabled ' ] ;
instance . limitsNavigationsToAppBoundDomains =
map [ ' limitsNavigationsToAppBoundDomains ' ] ;
2022-10-18 18:12:33 +02:00
instance . loadWithOverviewMode = map [ ' loadWithOverviewMode ' ] ;
instance . loadsImagesAutomatically = map [ ' loadsImagesAutomatically ' ] ;
2022-12-03 15:58:12 +01:00
instance . maximumZoomScale = map [ ' maximumZoomScale ' ] ;
instance . mediaPlaybackRequiresUserGesture =
map [ ' mediaPlaybackRequiresUserGesture ' ] ;
2022-10-18 18:12:33 +02:00
instance . minimumLogicalFontSize = map [ ' minimumLogicalFontSize ' ] ;
2022-12-03 15:58:12 +01:00
instance . minimumZoomScale = map [ ' minimumZoomScale ' ] ;
2022-10-18 18:12:33 +02:00
instance . needInitialFocus = map [ ' needInitialFocus ' ] ;
instance . offscreenPreRaster = map [ ' offscreenPreRaster ' ] ;
instance . overScrollMode =
OverScrollMode . fromNativeValue ( map [ ' overScrollMode ' ] ) ;
2022-12-03 15:58:12 +01:00
instance . pageZoom = map [ ' pageZoom ' ] ;
instance . preferredContentMode =
UserPreferredContentMode . fromNativeValue ( map [ ' preferredContentMode ' ] ) ;
2022-12-15 17:43:29 +01:00
instance . resourceCustomSchemes = map [ ' resourceCustomSchemes ' ] ! = null
? List < String > . from ( map [ ' resourceCustomSchemes ' ] ! . cast < String > ( ) )
: null ;
2022-12-03 15:58:12 +01:00
instance . safeBrowsingEnabled = map [ ' safeBrowsingEnabled ' ] ;
instance . sansSerifFontFamily = map [ ' sansSerifFontFamily ' ] ;
instance . saveFormData = map [ ' saveFormData ' ] ;
2022-10-18 18:12:33 +02:00
instance . scrollBarStyle =
ScrollBarStyle . fromNativeValue ( map [ ' scrollBarStyle ' ] ) ;
instance . scrollbarFadingEnabled = map [ ' scrollbarFadingEnabled ' ] ;
2022-12-03 15:58:12 +01:00
instance . scrollsToTop = map [ ' scrollsToTop ' ] ;
2022-10-18 18:12:33 +02:00
instance . selectionGranularity =
SelectionGranularity . fromNativeValue ( map [ ' selectionGranularity ' ] ) ;
2022-12-03 15:58:12 +01:00
instance . serifFontFamily = map [ ' serifFontFamily ' ] ;
2022-10-18 18:12:33 +02:00
instance . sharedCookiesEnabled = map [ ' sharedCookiesEnabled ' ] ;
2022-12-15 17:43:29 +01:00
instance . shouldPrintBackgrounds = map [ ' shouldPrintBackgrounds ' ] ;
2022-12-03 15:58:12 +01:00
instance . standardFontFamily = map [ ' standardFontFamily ' ] ;
instance . supportMultipleWindows = map [ ' supportMultipleWindows ' ] ;
instance . supportZoom = map [ ' supportZoom ' ] ;
instance . suppressesIncrementalRendering =
map [ ' suppressesIncrementalRendering ' ] ;
instance . textZoom = map [ ' textZoom ' ] ;
instance . thirdPartyCookiesEnabled = map [ ' thirdPartyCookiesEnabled ' ] ;
instance . transparentBackground = map [ ' transparentBackground ' ] ;
2022-10-18 18:12:33 +02:00
instance . upgradeKnownHostsToHTTPS = map [ ' upgradeKnownHostsToHTTPS ' ] ;
2022-12-03 15:58:12 +01:00
instance . useHybridComposition = map [ ' useHybridComposition ' ] ;
instance . useWideViewPort = map [ ' useWideViewPort ' ] ;
instance . userAgent = map [ ' userAgent ' ] ;
instance . verticalScrollBarEnabled = map [ ' verticalScrollBarEnabled ' ] ;
instance . verticalScrollbarPosition =
VerticalScrollbarPosition . fromNativeValue (
map [ ' verticalScrollbarPosition ' ] ) ;
2022-10-18 18:12:33 +02:00
return instance ;
}
///Converts instance to a map.
Map < String , dynamic > toMap ( ) {
return {
2022-12-03 15:58:12 +01:00
" accessibilityIgnoresInvertColors " : accessibilityIgnoresInvertColors ,
" algorithmicDarkeningAllowed " : algorithmicDarkeningAllowed ,
2022-10-22 04:05:41 +02:00
" allowBackgroundAudioPlaying " : allowBackgroundAudioPlaying ,
2022-10-18 18:12:33 +02:00
" allowContentAccess " : allowContentAccess ,
" allowFileAccess " : allowFileAccess ,
2022-12-03 15:58:12 +01:00
" allowFileAccessFromFileURLs " : allowFileAccessFromFileURLs ,
" allowUniversalAccessFromFileURLs " : allowUniversalAccessFromFileURLs ,
" allowingReadAccessTo " : allowingReadAccessTo ? . toString ( ) ,
" allowsAirPlayForMediaPlayback " : allowsAirPlayForMediaPlayback ,
" allowsBackForwardNavigationGestures " :
allowsBackForwardNavigationGestures ,
" allowsInlineMediaPlayback " : allowsInlineMediaPlayback ,
" allowsLinkPreview " : allowsLinkPreview ,
" allowsPictureInPictureMediaPlayback " :
allowsPictureInPictureMediaPlayback ,
" alwaysBounceHorizontal " : alwaysBounceHorizontal ,
" alwaysBounceVertical " : alwaysBounceVertical ,
2022-10-18 18:12:33 +02:00
" appCachePath " : appCachePath ,
2022-12-03 15:58:12 +01:00
" applePayAPIEnabled " : applePayAPIEnabled ,
" applicationNameForUserAgent " : applicationNameForUserAgent ,
" automaticallyAdjustsScrollIndicatorInsets " :
automaticallyAdjustsScrollIndicatorInsets ,
2022-10-18 18:12:33 +02:00
" blockNetworkImage " : blockNetworkImage ,
" blockNetworkLoads " : blockNetworkLoads ,
2022-12-03 15:58:12 +01:00
" builtInZoomControls " : builtInZoomControls ,
" cacheEnabled " : cacheEnabled ,
2022-10-18 18:12:33 +02:00
" cacheMode " : cacheMode ? . toNativeValue ( ) ,
2022-12-03 15:58:12 +01:00
" clearCache " : clearCache ,
" clearSessionCache " : clearSessionCache ,
" contentBlockers " : contentBlockers ? . map ( ( e ) = > e . toMap ( ) ) . toList ( ) ,
" contentInsetAdjustmentBehavior " :
contentInsetAdjustmentBehavior ? . toNativeValue ( ) ,
2022-10-18 18:12:33 +02:00
" cursiveFontFamily " : cursiveFontFamily ,
2022-12-03 15:58:12 +01:00
" dataDetectorTypes " :
dataDetectorTypes ? . map ( ( e ) = > e . toNativeValue ( ) ) . toList ( ) ,
" databaseEnabled " : databaseEnabled ,
" decelerationRate " : decelerationRate ? . toNativeValue ( ) ,
2022-10-18 18:12:33 +02:00
" defaultFixedFontSize " : defaultFixedFontSize ,
" defaultFontSize " : defaultFontSize ,
" defaultTextEncodingName " : defaultTextEncodingName ,
2022-12-03 15:58:12 +01:00
" defaultVideoPoster " : defaultVideoPoster ,
" disableContextMenu " : disableContextMenu ,
" disableDefaultErrorPage " : disableDefaultErrorPage ,
" disableHorizontalScroll " : disableHorizontalScroll ,
" disableInputAccessoryView " : disableInputAccessoryView ,
" disableLongPressContextMenuOnLinks " : disableLongPressContextMenuOnLinks ,
" disableVerticalScroll " : disableVerticalScroll ,
2022-10-18 18:12:33 +02:00
" disabledActionModeMenuItems " :
disabledActionModeMenuItems ? . toNativeValue ( ) ,
2022-12-03 15:58:12 +01:00
" disallowOverScroll " : disallowOverScroll ,
" displayZoomControls " : displayZoomControls ,
" domStorageEnabled " : domStorageEnabled ,
" enableViewportScale " : enableViewportScale ,
" enterpriseAuthenticationAppLinkPolicyEnabled " :
enterpriseAuthenticationAppLinkPolicyEnabled ,
2022-10-18 18:12:33 +02:00
" fantasyFontFamily " : fantasyFontFamily ,
" fixedFontFamily " : fixedFontFamily ,
" forceDark " : forceDark ? . toNativeValue ( ) ,
" forceDarkStrategy " : forceDarkStrategy ? . toNativeValue ( ) ,
" geolocationEnabled " : geolocationEnabled ,
2022-12-03 15:58:12 +01:00
" hardwareAcceleration " : hardwareAcceleration ,
" horizontalScrollBarEnabled " : horizontalScrollBarEnabled ,
" horizontalScrollbarThumbColor " : horizontalScrollbarThumbColor ? . toHex ( ) ,
" horizontalScrollbarTrackColor " : horizontalScrollbarTrackColor ? . toHex ( ) ,
" iframeAllow " : iframeAllow ,
" iframeAllowFullscreen " : iframeAllowFullscreen ,
" iframeCsp " : iframeCsp ,
" iframeName " : iframeName ,
" iframeReferrerPolicy " : iframeReferrerPolicy ? . toNativeValue ( ) ,
" iframeSandbox " : iframeSandbox ? . map ( ( e ) = > e . toNativeValue ( ) ) . toList ( ) ,
" ignoresViewportScaleLimits " : ignoresViewportScaleLimits ,
" incognito " : incognito ,
" initialScale " : initialScale ,
" isDirectionalLockEnabled " : isDirectionalLockEnabled ,
" isElementFullscreenEnabled " : isElementFullscreenEnabled ,
" isFindInteractionEnabled " : isFindInteractionEnabled ,
" isFraudulentWebsiteWarningEnabled " : isFraudulentWebsiteWarningEnabled ,
2022-12-15 17:43:29 +01:00
" isInspectable " : isInspectable ,
2022-12-03 15:58:12 +01:00
" isPagingEnabled " : isPagingEnabled ,
" isSiteSpecificQuirksModeEnabled " : isSiteSpecificQuirksModeEnabled ,
" isTextInteractionEnabled " : isTextInteractionEnabled ,
" javaScriptCanOpenWindowsAutomatically " :
javaScriptCanOpenWindowsAutomatically ,
" javaScriptEnabled " : javaScriptEnabled ,
2022-10-18 18:12:33 +02:00
" layoutAlgorithm " : layoutAlgorithm ? . toNativeValue ( ) ,
2022-12-03 15:58:12 +01:00
" limitsNavigationsToAppBoundDomains " : limitsNavigationsToAppBoundDomains ,
2022-10-18 18:12:33 +02:00
" loadWithOverviewMode " : loadWithOverviewMode ,
" loadsImagesAutomatically " : loadsImagesAutomatically ,
2022-12-03 15:58:12 +01:00
" maximumViewportInset " : maximumViewportInset ? . toMap ( ) ,
" maximumZoomScale " : maximumZoomScale ,
" mediaPlaybackRequiresUserGesture " : mediaPlaybackRequiresUserGesture ,
" mediaType " : mediaType ,
" minimumFontSize " : minimumFontSize ,
2022-10-18 18:12:33 +02:00
" minimumLogicalFontSize " : minimumLogicalFontSize ,
2022-12-03 15:58:12 +01:00
" minimumViewportInset " : minimumViewportInset ? . toMap ( ) ,
" minimumZoomScale " : minimumZoomScale ,
" mixedContentMode " : mixedContentMode ? . toNativeValue ( ) ,
2022-10-18 18:12:33 +02:00
" needInitialFocus " : needInitialFocus ,
2022-12-03 15:58:12 +01:00
" networkAvailable " : networkAvailable ,
2022-10-18 18:12:33 +02:00
" offscreenPreRaster " : offscreenPreRaster ,
2022-12-03 15:58:12 +01:00
" overScrollMode " : overScrollMode ? . toNativeValue ( ) ,
" pageZoom " : pageZoom ,
" preferredContentMode " : preferredContentMode ? . toNativeValue ( ) ,
" regexToCancelSubFramesLoading " : regexToCancelSubFramesLoading ,
" rendererPriorityPolicy " : rendererPriorityPolicy ? . toMap ( ) ,
2022-12-15 17:43:29 +01:00
" requestedWithHeaderOriginAllowList " :
requestedWithHeaderOriginAllowList ? . toList ( ) ,
2022-12-03 15:58:12 +01:00
" resourceCustomSchemes " : resourceCustomSchemes ,
" safeBrowsingEnabled " : safeBrowsingEnabled ,
2022-10-18 18:12:33 +02:00
" sansSerifFontFamily " : sansSerifFontFamily ,
2022-12-03 15:58:12 +01:00
" saveFormData " : saveFormData ,
" scrollBarDefaultDelayBeforeFade " : scrollBarDefaultDelayBeforeFade ,
" scrollBarFadeDuration " : scrollBarFadeDuration ,
" scrollBarStyle " : scrollBarStyle ? . toNativeValue ( ) ,
" scrollbarFadingEnabled " : scrollbarFadingEnabled ,
" scrollsToTop " : scrollsToTop ,
" selectionGranularity " : selectionGranularity ? . toNativeValue ( ) ,
2022-10-18 18:12:33 +02:00
" serifFontFamily " : serifFontFamily ,
2022-12-03 15:58:12 +01:00
" sharedCookiesEnabled " : sharedCookiesEnabled ,
2022-12-15 17:43:29 +01:00
" shouldPrintBackgrounds " : shouldPrintBackgrounds ,
2022-10-18 18:12:33 +02:00
" standardFontFamily " : standardFontFamily ,
" supportMultipleWindows " : supportMultipleWindows ,
2022-12-03 15:58:12 +01:00
" supportZoom " : supportZoom ,
" suppressesIncrementalRendering " : suppressesIncrementalRendering ,
" textZoom " : textZoom ,
" thirdPartyCookiesEnabled " : thirdPartyCookiesEnabled ,
" transparentBackground " : transparentBackground ,
" underPageBackgroundColor " : underPageBackgroundColor ? . toHex ( ) ,
" upgradeKnownHostsToHTTPS " : upgradeKnownHostsToHTTPS ,
2022-10-18 18:12:33 +02:00
" useHybridComposition " : useHybridComposition ,
2022-12-03 15:58:12 +01:00
" useOnDownloadStart " : useOnDownloadStart ,
" useOnLoadResource " : useOnLoadResource ,
" useOnNavigationResponse " : useOnNavigationResponse ,
2022-10-18 18:12:33 +02:00
" useOnRenderProcessGone " : useOnRenderProcessGone ,
2022-12-03 15:58:12 +01:00
" useShouldInterceptAjaxRequest " : useShouldInterceptAjaxRequest ,
" useShouldInterceptFetchRequest " : useShouldInterceptFetchRequest ,
" useShouldInterceptRequest " : useShouldInterceptRequest ,
" useShouldOverrideUrlLoading " : useShouldOverrideUrlLoading ,
" useWideViewPort " : useWideViewPort ,
" userAgent " : userAgent ,
" verticalScrollBarEnabled " : verticalScrollBarEnabled ,
2022-10-18 18:12:33 +02:00
" verticalScrollbarPosition " : verticalScrollbarPosition ? . toNativeValue ( ) ,
" verticalScrollbarThumbColor " : verticalScrollbarThumbColor ? . toHex ( ) ,
" verticalScrollbarTrackColor " : verticalScrollbarTrackColor ? . toHex ( ) ,
2022-12-03 15:58:12 +01:00
" webViewAssetLoader " : webViewAssetLoader ? . toMap ( ) ,
2022-10-18 18:12:33 +02:00
} ;
}
///Converts instance to a map.
Map < String , dynamic > toJson ( ) {
return toMap ( ) ;
}
///Returns a copy of InAppWebViewSettings.
InAppWebViewSettings copy ( ) {
return InAppWebViewSettings . fromMap ( toMap ( ) ) ? ? InAppWebViewSettings ( ) ;
}
@ override
String toString ( ) {
2022-12-15 17:43:29 +01:00
return ' InAppWebViewSettings{accessibilityIgnoresInvertColors: $ accessibilityIgnoresInvertColors , algorithmicDarkeningAllowed: $ algorithmicDarkeningAllowed , allowBackgroundAudioPlaying: $ allowBackgroundAudioPlaying , allowContentAccess: $ allowContentAccess , allowFileAccess: $ allowFileAccess , allowFileAccessFromFileURLs: $ allowFileAccessFromFileURLs , allowUniversalAccessFromFileURLs: $ allowUniversalAccessFromFileURLs , allowingReadAccessTo: $ allowingReadAccessTo , allowsAirPlayForMediaPlayback: $ allowsAirPlayForMediaPlayback , allowsBackForwardNavigationGestures: $ allowsBackForwardNavigationGestures , allowsInlineMediaPlayback: $ allowsInlineMediaPlayback , allowsLinkPreview: $ allowsLinkPreview , allowsPictureInPictureMediaPlayback: $ allowsPictureInPictureMediaPlayback , alwaysBounceHorizontal: $ alwaysBounceHorizontal , alwaysBounceVertical: $ alwaysBounceVertical , appCachePath: $ appCachePath , applePayAPIEnabled: $ applePayAPIEnabled , applicationNameForUserAgent: $ applicationNameForUserAgent , automaticallyAdjustsScrollIndicatorInsets: $ automaticallyAdjustsScrollIndicatorInsets , blockNetworkImage: $ blockNetworkImage , blockNetworkLoads: $ blockNetworkLoads , builtInZoomControls: $ builtInZoomControls , cacheEnabled: $ cacheEnabled , cacheMode: $ cacheMode , clearCache: $ clearCache , clearSessionCache: $ clearSessionCache , contentBlockers: $ contentBlockers , contentInsetAdjustmentBehavior: $ contentInsetAdjustmentBehavior , cursiveFontFamily: $ cursiveFontFamily , dataDetectorTypes: $ dataDetectorTypes , databaseEnabled: $ databaseEnabled , decelerationRate: $ decelerationRate , defaultFixedFontSize: $ defaultFixedFontSize , defaultFontSize: $ defaultFontSize , defaultTextEncodingName: $ defaultTextEncodingName , defaultVideoPoster: $ defaultVideoPoster , disableContextMenu: $ disableContextMenu , disableDefaultErrorPage: $ disableDefaultErrorPage , disableHorizontalScroll: $ disableHorizontalScroll , disableInputAccessoryView: $ disableInputAccessoryView , disableLongPressContextMenuOnLinks: $ disableLongPressContextMenuOnLinks , disableVerticalScroll: $ disableVerticalScroll , disabledActionModeMenuItems: $ disabledActionModeMenuItems , disallowOverScroll: $ disallowOverScroll , displayZoomControls: $ displayZoomControls , domStorageEnabled: $ domStorageEnabled , enableViewportScale: $ enableViewportScale , enterpriseAuthenticationAppLinkPolicyEnabled: $ enterpriseAuthenticationAppLinkPolicyEnabled , fantasyFontFamily: $ fantasyFontFamily , fixedFontFamily: $ fixedFontFamily , forceDark: $ forceDark , forceDarkStrategy: $ forceDarkStrategy , geolocationEnabled: $ geolocationEnabled , hardwareAcceleration: $ hardwareAcceleration , horizontalScrollBarEnabled: $ horizontalScrollBarEnabled , horizontalScrollbarThumbColor: $ horizontalScrollbarThumbColor , horizontalScrollbarTrackColor: $ horizontalScrollbarTrackColor , iframeAllow: $ iframeAllow , iframeAllowFullscreen: $ iframeAllowFullscreen , iframeCsp: $ iframeCsp , iframeName: $ iframeName , iframeReferrerPolicy: $ iframeReferrerPolicy , iframeSandbox: $ iframeSandbox , ignoresViewportScaleLimits: $ ignoresViewportScaleLimits , incognito: $ incognito , initialScale: $ initialScale , isDirectionalLockEnabled: $ isDirectionalLockEnabled , isElementFullscreenEnabled: $ isElementFullscreenEnabled , isFindInteractionEnabled: $ isFindInteractionEnabled , isFraudulentWebsiteWarningEnabled: $ isFraudulentWebsiteWarningEnabled , isInspectable: $ isInspectable , isPagingEnabled: $ isPagingEnabled , isSiteSpecificQuirksModeEnabled: $ isSiteSpecificQuirksModeEnabled , isTextInteractionEnabled: $ isTextInteractionEnabled , javaScriptCanOpenWindowsAutomatically: $ javaScriptCanOpenWindowsAutomatically , javaScriptEnabled: $ javaScriptEnabled , layoutAlgorithm: $ layoutAlgorithm , limitsNavigationsToAppBoundDomains: $ limitsNavigationsToAppBoundDomains , loadWithOverviewMode: $ loadWithOverviewMode , loadsImagesAutomatically: $ loadsImagesAutomatically , maximumViewportInset: $ maximumViewportInset , maximumZoomScale: $ maximumZoomScale , mediaPlaybackRequiresUserGesture: $ mediaPlaybackRequiresUserGesture , mediaType: $ mediaType , minimumFontSize: $ minimumFontSize , minimumLogicalFontSize: $ minimumLogicalFontSize ,
2022-10-18 18:12:33 +02:00
}
}