InAppWebViewOptions class

Use InAppWebViewSettings instead.

Implemented types
Annotations

Constructors

InAppWebViewOptions({bool useShouldOverrideUrlLoading = false, bool useOnLoadResource = false, bool useOnDownloadStart = false, bool clearCache = false, String userAgent = "", String applicationNameForUserAgent = "", bool javaScriptEnabled = true, bool javaScriptCanOpenWindowsAutomatically = false, bool mediaPlaybackRequiresUserGesture = true, int? minimumFontSize, bool verticalScrollBarEnabled = true, bool horizontalScrollBarEnabled = true, List<String> resourceCustomSchemes = const [], List<ContentBlocker> contentBlockers = const [], UserPreferredContentMode? preferredContentMode = UserPreferredContentMode.RECOMMENDED, bool useShouldInterceptAjaxRequest = false, bool useShouldInterceptFetchRequest = false, bool incognito = false, bool cacheEnabled = true, bool transparentBackground = false, bool disableVerticalScroll = false, bool disableHorizontalScroll = false, bool disableContextMenu = false, bool supportZoom = true, bool allowFileAccessFromFileURLs = false, bool allowUniversalAccessFromFileURLs = false})

Properties

allowFileAccessFromFileURLs bool
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.
getter/setter pair
allowUniversalAccessFromFileURLs bool
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.
getter/setter pair
applicationNameForUserAgent String
Append to the existing user-agent. Setting userAgent will override this.
getter/setter pair
cacheEnabled bool
Sets whether WebView should use browser caching. The default value is true.
getter/setter pair
clearCache bool
Set to true to have all the browser's cache cleared before the new WebView is opened. The default value is false.
getter/setter pair
contentBlockers List<ContentBlocker>
List of ContentBlocker that are a set of rules used to block content in the browser window.
getter/setter pair
disableContextMenu bool
Set to true to disable context menu. The default value is false.
getter/setter pair
disableHorizontalScroll bool
Set to true to disable horizontal scroll. The default value is false.
getter/setter pair
disableVerticalScroll bool
Set to true to disable vertical scroll. The default value is false.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
horizontalScrollBarEnabled bool
Define whether the horizontal scrollbar should be drawn or not. The default value is true.
getter/setter pair
incognito bool
Set to true to open a browser window with incognito mode. The default value is false.
getter/setter pair
javaScriptCanOpenWindowsAutomatically bool
Set to true to allow JavaScript open windows without user interaction. The default value is false.
getter/setter pair
javaScriptEnabled bool
Set to true to enable JavaScript. The default value is true.
getter/setter pair
mediaPlaybackRequiresUserGesture bool
Set to true to prevent HTML5 audio or video from autoplaying. The default value is true.
getter/setter pair
minimumFontSize int?
Sets the minimum font size. The default value is 8 for Android, 0 for iOS.
getter/setter pair
preferredContentMode UserPreferredContentMode?
Sets the content mode that the WebView needs to use when loading and rendering a webpage. The default value is UserPreferredContentMode.RECOMMENDED.
getter/setter pair
resourceCustomSchemes List<String>
List of custom schemes that the WebView must handle. Use the PlatformWebViewCreationParams.onLoadResourceCustomScheme event to intercept resource requests with custom scheme.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
supportZoom bool
Set to false if the WebView should not support zooming using its on-screen zoom controls and gestures. The default value is true.
getter/setter pair
transparentBackground bool
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.
getter/setter pair
useOnDownloadStart bool
Set to true to be able to listen at the PlatformWebViewCreationParams.onDownloadStart event. The default value is false.
getter/setter pair
useOnLoadResource bool
Set to true to be able to listen at the PlatformWebViewCreationParams.onLoadResource event. The default value is false.
getter/setter pair
userAgent String
Sets the user-agent for the WebView.
getter/setter pair
useShouldInterceptAjaxRequest bool
Set to true to be able to listen at the PlatformWebViewCreationParams.shouldInterceptAjaxRequest event. The default value is false.
getter/setter pair
useShouldInterceptFetchRequest bool
Set to true to be able to listen at the PlatformWebViewCreationParams.shouldInterceptFetchRequest event. The default value is false.
getter/setter pair
useShouldOverrideUrlLoading bool
Set to true to be able to listen at the PlatformWebViewCreationParams.shouldOverrideUrlLoading event. The default value is false.
getter/setter pair
verticalScrollBarEnabled bool
Define whether the vertical scrollbar should be drawn or not. The default value is true.
getter/setter pair

Methods

copy() InAppWebViewOptions
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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) InAppWebViewOptions
override