getBlockNetworkLoads static method
Gets whether Service Workers are prohibited from loading any resources from the network.
This method should only be called if WebViewFeature.isFeatureSupported returns true for WebViewFeature.SERVICE_WORKER_BLOCK_NETWORK_LOADS.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - ServiceWorkerWebSettingsCompat.getBlockNetworkLoads)
Use the PlatformServiceWorkerController.isMethodSupported method to check if this method is supported at runtime.
Implementation
static Future<bool> getBlockNetworkLoads() =>
PlatformServiceWorkerController.static().getBlockNetworkLoads();