WebViewEnvironmentSettings class
This class represents all the PlatformWebViewEnvironment settings available.
The browserExecutableFolder, userDataFolder and additionalBrowserArguments may be overridden by values either specified in environment variables or in the registry.
Officially Supported Platforms/Implementations:
- Windows
Constructors
Properties
- additionalBrowserArguments → String?
-
If there are multiple switches, there should be a space in between them.
The one exception is if multiple features are being enabled/disabled for a single switch,
in which case the features should be comma-seperated.
Example:
"--disable-features=feature1,feature2 --some-other-switch --do-something"
final - allowSingleSignOnUsingOSPrimaryAccount → bool?
-
This property is used to enable single sign on with Azure Active Directory (AAD)
and personal Microsoft Account (MSA) resources inside WebView.
final
- browserExecutableFolder → String?
-
Use browserExecutableFolder to specify whether WebView2 controls use a fixed
or installed version of the WebView2 Runtime that exists on a user machine.
To use a fixed version of the WebView2 Runtime, pass the folder path that contains
the fixed version of the WebView2 Runtime to browserExecutableFolder.
BrowserExecutableFolder supports both relative (to the application's executable) and absolute files paths.
To create WebView2 controls that use the installed version of the WebView2 Runtime that exists on user machines,
pass a
null
or empty string to browserExecutableFolder. In this scenario, the API tries to find a compatible version of the WebView2 Runtime that is installed on the user machine (first at the machine level, and then per user) using the selected channel preference. The path of fixed version of the WebView2 Runtime should not contain\Edge\Application\
. When such a path is used, the API fails withHRESULT_FROM_WIN32(ERROR_NOT_SUPPORTED)
.final - hashCode → int
-
The hash code for this object.
no setterinherited
- language → String?
-
The default display language for WebView.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- targetCompatibleBrowserVersion → String?
-
Specifies the version of the WebView2 Runtime binaries required to be compatible with your app.
final
- userDataFolder → String?
-
You may specify the userDataFolder to change the default user data folder location for WebView2.
The path is either an absolute file path or a relative file path that is interpreted as relative
to the compiled code for the current process.
For UWP apps, the default user data folder is the app data folder for the package.
For non-UWP apps, the default user data (
{Executable File Name}.WebView2
) folder is created in the same directory next to the compiled code for the app. WebView2 creation fails if the compiled code is running in a directory in which the process does not have permission to create a new directory. The app is responsible to clean up the associated user data folder when it is done.final
Methods
-
copy(
) → WebViewEnvironmentSettings - Returns a copy of WebViewEnvironmentSettings.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts instance to a map.
-
toMap(
) → Map< String, dynamic> - Converts instance to a map.
-
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) → WebViewEnvironmentSettings? - Gets a possible WebViewEnvironmentSettings instance from a Map value.