IOSInAppWebViewOptions class Null safety

This class represents all the iOS-only WebView options available.

Implemented types

Constructors

IOSInAppWebViewOptions({bool disallowOverScroll = false, bool enableViewportScale = false, bool suppressesIncrementalRendering = false, bool allowsAirPlayForMediaPlayback = true, bool allowsBackForwardNavigationGestures = true, bool allowsLinkPreview = true, bool ignoresViewportScaleLimits = false, bool allowsInlineMediaPlayback = false, bool allowsPictureInPictureMediaPlayback = true, bool isFraudulentWebsiteWarningEnabled = true, IOSWKSelectionGranularity selectionGranularity = IOSWKSelectionGranularity.DYNAMIC, List<IOSWKDataDetectorTypes> dataDetectorTypes = const [IOSWKDataDetectorTypes.NONE], bool sharedCookiesEnabled = false, bool automaticallyAdjustsScrollIndicatorInsets = false, bool accessibilityIgnoresInvertColors = false, IOSUIScrollViewDecelerationRate decelerationRate = IOSUIScrollViewDecelerationRate.NORMAL, bool alwaysBounceVertical = false, bool alwaysBounceHorizontal = false, bool scrollsToTop = true, bool isPagingEnabled = false, double maximumZoomScale = 1.0, double minimumZoomScale = 1.0, IOSUIScrollViewContentInsetAdjustmentBehavior contentInsetAdjustmentBehavior = IOSUIScrollViewContentInsetAdjustmentBehavior.NEVER, bool isDirectionalLockEnabled = false, String? mediaType, double pageZoom = 1.0, bool limitsNavigationsToAppBoundDomains = false, bool useOnNavigationResponse = false, bool applePayAPIEnabled = false, Uri? allowingReadAccessTo, bool disableLongPressContextMenuOnLinks = false})

Properties

accessibilityIgnoresInvertColors bool
A Boolean value indicating whether the WebView ignores an accessibility request to invert its colors. The default value is false. [...]
read / write
allowingReadAccessTo Uri?
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.
read / write
allowsAirPlayForMediaPlayback bool
Set to true to allow AirPlay. The default value is true.
read / write
allowsBackForwardNavigationGestures bool
Set to true to allow the horizontal swipe gestures trigger back-forward list navigations. The default value is true.
read / write
allowsInlineMediaPlayback bool
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.
read / write
allowsLinkPreview bool
Set to true to allow that pressing on a link displays a preview of the destination for the link. The default value is true. [...]
read / write
allowsPictureInPictureMediaPlayback bool
Set to true to allow HTML5 videos play picture-in-picture. The default value is true. [...]
read / write
alwaysBounceHorizontal bool
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 IOSInAppWebViewOptions.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.
read / write
alwaysBounceVertical bool
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 IOSInAppWebViewOptions.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.
read / write
applePayAPIEnabled bool
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. [...]
read / write
automaticallyAdjustsScrollIndicatorInsets bool
Configures whether the scroll indicator insets are automatically adjusted by the system. The default value is false. [...]
read / write
contentInsetAdjustmentBehavior IOSUIScrollViewContentInsetAdjustmentBehavior
Configures how safe area insets are added to the adjusted content inset. The default value is IOSUIScrollViewContentInsetAdjustmentBehavior.NEVER.
read / write
dataDetectorTypes List<IOSWKDataDetectorTypes>
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 IOSWKDataDetectorTypes.LINK. The default value is IOSWKDataDetectorTypes.NONE. [...]
read / write
decelerationRate IOSUIScrollViewDecelerationRate
A IOSUIScrollViewDecelerationRate value that determines the rate of deceleration after the user lifts their finger. The default value is IOSUIScrollViewDecelerationRate.NORMAL.
read / write
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.
read / write
disallowOverScroll bool
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.
read / write
enableViewportScale bool
Set to true to allow a viewport meta tag to either disable or restrict the range of user scaling. The default value is false.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
ignoresViewportScaleLimits bool
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.
read / write
isDirectionalLockEnabled bool
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.
read / write
isFraudulentWebsiteWarningEnabled bool
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. [...]
read / write
isPagingEnabled bool
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.
read / write
limitsNavigationsToAppBoundDomains bool
A Boolean value that indicates whether the web view limits navigation to pages within the app’s domain. Check App-Bound Domains for more details. The default value is false. [...]
read / write
maximumZoomScale double
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.
read / write
mediaType String?
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. [...]
read / write
minimumZoomScale double
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.
read / write
pageZoom double
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. [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
scrollsToTop bool
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.
read / write
selectionGranularity IOSWKSelectionGranularity
The level of granularity with which the user can interactively select content in the web view. The default value is IOSWKSelectionGranularity.DYNAMIC
read / write
sharedCookiesEnabled bool
Set true if shared cookies from HTTPCookieStorage.shared should used for every load request in the WebView. The default value is false. [...]
read / write
suppressesIncrementalRendering bool
Set to true if you want the WebView suppresses content rendering until it is fully loaded into memory. The default value is false.
read / write
useOnNavigationResponse bool
Set to true to be able to listen to the WebView.iosOnNavigationResponse event. The default value is false.
read / write

Methods

copy() IOSInAppWebViewOptions
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() Map<String, dynamic>
override
toMap() Map<String, dynamic>
override
toString() String
A string representation of this object. [...]
override

Operators

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

Static Methods

fromMap(Map<String, dynamic> map) IOSInAppWebViewOptions
override