create static method
- WebViewEnvironmentSettings? settings,
Creates the PlatformWebViewEnvironment using settings.
Check https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.2210.55#createcorewebview2environmentwithoptions for more info.
Officially Supported Platforms/Implementations:
- Windows WebView2 (Official API - CreateCoreWebView2EnvironmentWithOptions)
- Linux WPE WebKit (Official API - WebKitWebContext):
- Creates a new WebKitWebContext for shared WebView configuration.
Parameters - Officially Supported Platforms/Implementations:
settings: all platforms
Use the PlatformWebViewEnvironment.isMethodSupported method to check if this method is supported at runtime.
Implementation
static Future<WebViewEnvironment> create({
WebViewEnvironmentSettings? settings,
}) async {
return WebViewEnvironment.fromPlatform(
platform: await PlatformWebViewEnvironment.static().create(
settings: settings,
),
);
}