setBlockNetworkLoads method

  1. @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'ServiceWorkerWebSettingsCompat.setBlockNetworkLoads', apiUrl: 'https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setBlockNetworkLoads(boolean)')])
Future<void> setBlockNetworkLoads(
  1. bool flag
)

Sets whether Service Workers should not load 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:

Parameters - Officially Supported Platforms/Implementations:

  • flag: all platforms

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

Implementation

@SupportedPlatforms(
  platforms: [
    AndroidPlatform(
      apiName: 'ServiceWorkerWebSettingsCompat.setBlockNetworkLoads',
      apiUrl:
          'https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setBlockNetworkLoads(boolean)',
    ),
  ],
)
Future<void> setBlockNetworkLoads(bool flag) {
  throw UnimplementedError(
    'setBlockNetworkLoads is not implemented on the current platform',
  );
}