disableWebView static method

Future<void> disableWebView()

Indicate that the current process does not intend to use WebView, and that an exception should be thrown if a WebView is created or any other methods in the android.webkit package are used.

Applications with multiple processes may wish to call this in processes that are not intended to use WebView to avoid accidentally incurring the memory usage of initializing WebView in long-lived processes that have no need for it, and to prevent potential data directory conflicts (see ProcessGlobalConfigSettings.dataDirectorySuffix).

Officially Supported Platforms/Implementations:

Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.

Implementation

static Future<void> disableWebView() =>
    PlatformInAppWebViewController.static().disableWebView();