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).

NOTE for Android: available only on Android 28+.

Officially Supported Platforms/Implementations:

Implementation

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