create static method

Future<WebViewEnvironment> create({
  1. 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:

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,
    ),
  );
}