disableWebView static method
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:
- Android WebView 28+ (Official API - WebView.disableWebView)
Use the PlatformInAppWebViewController.isMethodSupported method to check if this method is supported at runtime.
Implementation
static Future<void> disableWebView() =>
PlatformInAppWebViewController.static().disableWebView();