setCacheMode method
- @SupportedPlatforms.new(platforms: [AndroidPlatform(apiName: 'ServiceWorkerWebSettingsCompat.setCacheMode', apiUrl: 'https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setCacheMode(int)')])
- CacheMode mode
Overrides the way the cache is used.
This method should only be called if WebViewFeature.isFeatureSupported returns true for WebViewFeature.SERVICE_WORKER_CACHE_MODE.
Officially Supported Platforms/Implementations:
- Android WebView (Official API - ServiceWorkerWebSettingsCompat.setCacheMode)
Parameters - Officially Supported Platforms/Implementations:
mode: all platforms
Use the PlatformServiceWorkerController.isMethodSupported method to check if this method is supported at runtime.
Implementation
@SupportedPlatforms(
platforms: [
AndroidPlatform(
apiName: 'ServiceWorkerWebSettingsCompat.setCacheMode',
apiUrl:
'https://developer.android.com/reference/androidx/webkit/ServiceWorkerWebSettingsCompat#setCacheMode(int)',
),
],
)
Future<void> setCacheMode(CacheMode mode) {
throw UnimplementedError(
'setCacheMode is not implemented on the current platform',
);
}